Post by SirHelsinki » Sat May 02, 2020 7:32 pm

Hi,

Everything is working but I get this code after I reg to my webstore

Code: Select all

 Warning: sprintf(): Too few arguments in /home/r269737/public_html/kauppa/catalog/controller/account/success.php on line 26
 
What should I do??

Thanks!!
Last edited by straightlight on Sat May 02, 2020 7:34 pm, edited 1 time in total.

New member

Posts

Joined
Sun Apr 26, 2020 1:16 pm

Post by straightlight » Sat May 02, 2020 7:35 pm

Please post line 26 of that line.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SirHelsinki » Sat May 02, 2020 7:37 pm

Here is Line 26

Code: Select all

$data['text_message'] = sprintf($this->language->get('text_message'), $this->url->link('information/contact'));
Last edited by straightlight on Sat May 02, 2020 7:40 pm, edited 1 time in total.
Reason: Please add the code tags!

New member

Posts

Joined
Sun Apr 26, 2020 1:16 pm

Post by straightlight » Sat May 02, 2020 7:40 pm

Do you see the text_message entry in your catalog/language/en-gb/account/success.php file?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SirHelsinki » Sat May 02, 2020 7:42 pm

Yes,
Like this,

Code: Select all

<?php
// Heading
$_['heading_title'] = 'Your Account Has Been Created!';

// Text
$_['text_message']  = '<p>Congratulations! Your new account has been successfully created!</p> <p>You can now take advantage of member privileges to enhance your online shopping experience with us.</p> <p>If you have ANY questions about the operation of this online shop, please e-mail the store owner.</p> <p>A confirmation has been sent to the provided e-mail address. If you have not received it within the hour, please <a href="%s">contact us</a>.</p>';
$_['text_approval'] = '<p>Thank you for registering with %s!</p><p>You will be notified by e-mail once your account has been activated by the store owner.</p><p>If you have ANY questions about the operation of this online shop, please <a href="%s">contact the store owner</a>.</p>';
$_['text_account']  = 'Account';
$_['text_success']  = 'Success';
Last edited by straightlight on Sat May 02, 2020 7:45 pm, edited 1 time in total.
Reason: Please add the code tags!

New member

Posts

Joined
Sun Apr 26, 2020 1:16 pm

Post by SirHelsinki » Sat May 02, 2020 7:46 pm

I have FIN SWE and ENG

SWE and ENG ok but FIN is giving the txt

Here is FIN version

Code: Select all

<?php
// Heading
$_['heading_title'] = 'Tilisi on luotu!';

// Text
$_['text_message']  = '<p>Onnittelut! Uusi tilisi on luotu onnistuneesti!</p> <p>Olet nyt %s Kumppani </p> <p>Jos sinulla on kysyttävää, lähetä sähköpostia kaupan ylläpitäjälle.</p> <p>Vahvistus lähetetään sähköpostiosoitteeseen. Jos et ole saanut sitä tunnin sisällä, ota <a href="%s"> yhteyttä meihin</a>.</p>';
$_['text_approval'] = '<p>Kiitos rekisteräinnistäsi %s!</p><p>Sinulle ilmoitetaan sähköpostitse, kun tilisi on aktivoitu.</p><p>Jos sinulla on kysyttävää verkkokauppamme toiminnasta, ole hyvä <a href="%s"> Ota yhteyttä meihin</a>.</p>';
$_['text_account']  = 'Oma tili';
$_['text_success']  = 'Onnistui';

New member

Posts

Joined
Sun Apr 26, 2020 1:16 pm

Post by SirHelsinki » Sat May 02, 2020 7:48 pm

What do you mean? :)

New member

Posts

Joined
Sun Apr 26, 2020 1:16 pm

Post by straightlight » Sat May 02, 2020 7:52 pm

Yes, this is an already reported bug. Based on the master branch, with small order triggers in the $this->url->link, it should look like this for the account/success controller:

Code: Select all

<?php
class ControllerAccountSuccess extends Controller {
	public function index() {
		$this->load->language('account/success');

		$this->document->setTitle($this->language->get('heading_title'));

		$data['breadcrumbs'] = array();

		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/home')
		);

		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_account'),
			'href' => $this->url->link('account/account', '', true)
		);

		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_success'),
			'href' => $this->url->link('account/success')
		);
		
		if ($this->customer->isLogged()) {
			$data['text_message'] = sprintf($this->language->get('text_success'), $this->url->link('information/contact'));
		} else {
			$data['text_message'] = sprintf($this->language->get('text_approval'), $this->config->get('config_name'), $this->url->link('information/contact'));
		}

		if ($this->cart->hasProducts()) {
			$data['continue'] = $this->url->link('checkout/cart');
		} else {
			$data['continue'] = $this->url->link('account/account', '', true);
		}

		$data['column_left'] = $this->load->controller('common/column_left');
		$data['column_right'] = $this->load->controller('common/column_right');
		$data['content_top'] = $this->load->controller('common/content_top');
		$data['content_bottom'] = $this->load->controller('common/content_bottom');
		$data['footer'] = $this->load->controller('common/footer');
		$data['header'] = $this->load->controller('common/header');

		$this->response->setOutput($this->load->view('common/success', $data));
	}
}
And catalog/language/en-gb/account/success.php file should look like this: https://github.com/opencart/opencart/bl ... uccess.php

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sat May 02, 2020 7:53 pm

SirHelsinki wrote:
Sat May 02, 2020 7:48 pm
What do you mean? :)
Please post the [ code ] and [ /code ] tags (without spaces) when posting codes!

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SirHelsinki » Sat May 02, 2020 8:05 pm

Now I get all in ENG?

Attachments

error.jpg

error.jpg (96.98 KiB) Viewed 458 times


New member

Posts

Joined
Sun Apr 26, 2020 1:16 pm

Post by straightlight » Sat May 02, 2020 8:07 pm

As my previous post indicates, this change needs to be done in your en-gb folder of your language folder and the same is addressed from the master branch. Since you're using additional languages, you also need to apply the same steps but you'll need to translate the text in your language as well.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by SirHelsinki » Sat May 02, 2020 8:09 pm

;D ;D ;D Lol I disn't see that!

Thanks for this!!

New member

Posts

Joined
Sun Apr 26, 2020 1:16 pm
Who is online

Users browsing this forum: Mike Guenther, paulfeakins and 463 guests