Post by claudinizsp » Sun Jul 31, 2011 9:23 am

When completed the sale, the error above mencionad.
Would anyone can help me, saying what it is?

Newbie

Posts

Joined
Sun Jun 05, 2011 1:59 am

Post by uksitebuilder » Sun Jul 31, 2011 2:33 pm

Need more details

what Version ?

What page ?

Exact error message ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by claudinizsp » Mon Aug 01, 2011 6:00 am

Sorry ;D .

version 1.5.1.1

When we completed the sales get an error ...

Warning: sprintf() [function.sprintf]: Too few arguments in /home/cheiroec/public_html/catalog/controller/checkout/success.php on line 52

as well as in the image below

Image

When I click the link order, apresenda the following error ...

Image

Image

Someone could help me?

Newbie

Posts

Joined
Sun Jun 05, 2011 1:59 am

Post by uksitebuilder » Mon Aug 01, 2011 4:28 pm

looks like a template issue, as it is not the standard template, you should maybe try checking with the tempalte developer.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by claudinizsp » Tue Aug 02, 2011 12:39 pm

Sorry, but not a question of the standard template for the same thing happens.
store image looks standard Brazilian forum.

Image

I would like help from someone please because nobody answers the Brazilian forum.

Newbie

Posts

Joined
Sun Jun 05, 2011 1:59 am

Post by uksitebuilder » Tue Aug 02, 2011 3:01 pm

Do you have any non-default payment modules installed ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by claudinizsp » Wed Aug 03, 2011 12:09 am

Yes.

Newbie

Posts

Joined
Sun Jun 05, 2011 1:59 am

Post by uksitebuilder » Wed Aug 03, 2011 12:15 am

Try disabling that for a test and choose a default payment method.

If that works fine, then it is the payment method causing the problem, in which case you will need to contact the payment module developer.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by claudinizsp » Wed Aug 03, 2011 12:22 pm

I've done it, and for example the Brazilian forum shop with this payment method is standard and also in error.
I believe that there is method of payment.
Please go to ...
www.opencartbrasil.com.br/loja

Newbie

Posts

Joined
Sun Jun 05, 2011 1:59 am

Post by rph » Wed Aug 03, 2011 2:37 pm

The problem is your language pack. Make sure this is present:

/catalog/language/[language]/checkout/success.php

Code: Select all

$_['text_customer'] = '<p>Your order has been successfully processed!</p><p>You can view your order history by going to the <a href="%s">my account</a> page and by clicking on <a href="%s">history</a>.</p>If your purchase has an associated download, you can goto the account <a href="%s">downloads</a> page to view them.</p><p>Please direct any questions you have to the <a href="%s">store owner</a>.</p><p>Thanks for shopping with us online!</p>';
Last edited by rph on Thu Aug 04, 2011 5:04 pm, edited 1 time in total.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by claudinizsp » Thu Aug 04, 2011 6:39 am

thanks, was just that.
thank you, problem fixed

Newbie

Posts

Joined
Sun Jun 05, 2011 1:59 am

Post by Snufkin » Fri Jan 27, 2012 4:32 pm

Hi
I have the same problem, but in another line. It seems that missing language tag, but i can't understand which
Warning: sprintf() [function.sprintf]: Too few arguments in catalog/controller/account/success.php on line 31

Newbie

Posts

Joined
Tue Jun 08, 2010 1:10 am

Post by albsim81 » Sat Mar 10, 2012 10:21 pm

Snufkin wrote:Hi
I have the same problem, but in another line. It seems that missing language tag, but i can't understand which
Warning: sprintf() [function.sprintf]: Too few arguments in catalog/controller/account/success.php on line 31
I have the same problem in the same line that is

Code: Select all

	$this->data['text_message'] = sprintf($this->language->get('text_message'), $this->url->link('information/contact'));

Sigaretta elettronica Opencart 1.5.4.1 italian translation


New member

Posts

Joined
Wed Jan 26, 2011 5:14 am
Location - Italy

Post by straightlight » Sun Mar 11, 2012 12:18 am

I never was a huge fan of sprintf as it can be full of surprises sometimes.

If you replace:

Code: Select all

$this->data['text_message'] = sprintf($this->language->get('text_message'), $this->url->link('information/contact'));
to read:

Code: Select all

 $this->data['text_message'] = str_replace(array("{contact_url}"), array($this->url->link('information/contact')), $this->language->get('text_message'));
Then, in your catalog/language/english/account/success.php file,

if you replace:

Code: Select all

$_['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 email the store owner.</p> <p>A confirmation has been sent to the provided email address. If you have not received it within the hour, please <a href="%s">contact us</a>.</p>';
to read:

Code: Select all

$_['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 email the store owner.</p> <p>A confirmation has been sent to the provided email address. If you have not received it within the hour, please <a href="{contact_url}">contact us</a>.</p>';
Will the error message still persists ?

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 rph » Sun Mar 11, 2012 4:09 am

Straightlight, man, you've gotta stop doing this. Rewriting the cart is not how you debug.

albsim81, your language file isn't current for the version of OpenCart you're using. Yes, it is that simple.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by straightlight » Sun Mar 11, 2012 4:11 am

rph wrote:Straightlight, man, you've gotta stop doing this. Rewriting the cart is not how you debug.

albsim81, your language file isn't current for the version of OpenCart you're using. Yes, it is that simple.
And stating that it's simple without providing an alternative solution is a better way ?

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 rph » Sun Mar 11, 2012 4:39 am

Your "alternative solution" only works because it forces the user to update the language file anyway. Does it fix other places in the cart where language breaks because it's out-of-date? No. Is it compatible with VQMod scripts which may try to make changes to language? No.

You have a hole in your skill set Straightlight. I'm not pointing it out to tear you down or to pretend I'm better. I'm pointing it out so you can be better at what you do.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by straightlight » Sun Mar 11, 2012 4:45 am

This topic only specifies on one location to where the problem needed to be fixed. There is no such case from my previous posts where it stated to modify this code towards other location in OC nor knowing where you see this information but you're obviously misinformed of what the code really does above even though it may force to update the language but at least without showing the errors to customers who are visiting the site so only appearing in the logs as it should. If you think this methodology is flaw while the logs keeps tracking those errors, then I can only say I do appreciate the input here but I more believe that in fact I'm more skilled than you think I am when it comes to PHP and from my own point of vue to what others may believe, I don't need to specify the mount of years of experience to demonstrate all the topics I have troubleshooted so far since it is already demonstrated and if I had to post this kind of fix 10000 more times towards other locations just so the customer doesn't have and doesn't need to see those error messages when they're shopping, I would definitely do it.

I appreciate your concern rph but I can definitely handle this.

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 rph » Sun Mar 11, 2012 5:00 am

straightlight wrote:This topic only specifies on one location to where the problem needed to be fixed.
Yes, because you didn't understand the problem and didn't take the time to try to understand it. You just made an assumption and started coding.

Remember, it's not that good programmers don't make mistakes. It's that they acknowledge those mistakes and learn from them. All you do is get argumentative.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by straightlight » Sun Mar 11, 2012 5:06 am

My assumption above is not about mistake, it is simply about re-writing the into the way it should of been so for this error to vanish without removing the output even though the language variable didn't existed which the merchant doesn't actually have to remove from the controller but rather to hide the error message while this variable can still be added into the language file anyhow. The way I see it, this is a good solution during while only in the logs from the admin / filesystem the logs are showing those errors rather than on screen so that customers doesn't have to question merchants and in fact the best solution so far until the variable does get added into the language pack.

A mistake you say ? I would rather call it a cure since there are absolutely no reasons whatsoever on why a customer should notice / see an error on screen during while they're shopping online.

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
Who is online

Users browsing this forum: No registered users and 13 guests