Post by ADD Creative » Thu Feb 23, 2012 7:53 pm

Hi Daniel,

There is still a fix needed to latest version in the svn of catalog\controller\payment\sagepay.php.

The 3 utf8_strlen in the simpleXor function need to be changed to just strlen. As $string will contain characters greater then 127 utf8_strlen will return the wrong length.

find:

Code: Select all

		for ($i = 0; $i < utf8_strlen($password); $i++) {
			$data[$i] = ord(substr($password, $i, 1));
		}

		$output = '';

		for ($i = 0; $i < utf8_strlen($string); $i++) {
    		$output .= chr(ord(substr($string, $i, 1)) ^ ($data[$i % utf8_strlen($password)]));
change to:

Code: Select all

		for ($i = 0; $i < strlen($password); $i++) {
			$data[$i] = ord(substr($password, $i, 1));
		}

		$output = '';

		for ($i = 0; $i < strlen($string); $i++) {
    		$output .= chr(ord(substr($string, $i, 1)) ^ ($data[$i % strlen($password)]));
And to be on the safe side in case Sage Pay returns any characters greater than 127.

find:

Code: Select all

$output = $this->simpleXor($string, $password);
change to:

Code: Select all

$output = utf8_encode($this->simpleXor($string, $password));
Thanks

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Daniel » Thu Feb 23, 2012 10:16 pm

tommieking wrote:I'm getting this from a fresh install of 1513

Code: Select all

Notice: Error: Could not load language english! in /home/user/public_html/scriptstore/system/library/language.php on line 26
I can log into the admin but the homepage is coming up with that message

reupload.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Thu Feb 23, 2012 10:19 pm

ADD Creative wrote:Hi Daniel,

There is still a fix needed to latest version in the svn of catalog\controller\payment\sagepay.php.

The 3 utf8_strlen in the simpleXor function need to be changed to just strlen. As $string will contain characters greater then 127 utf8_strlen will return the wrong length.

find:

Code: Select all

		for ($i = 0; $i < utf8_strlen($password); $i++) {
			$data[$i] = ord(substr($password, $i, 1));
		}

		$output = '';

		for ($i = 0; $i < utf8_strlen($string); $i++) {
    		$output .= chr(ord(substr($string, $i, 1)) ^ ($data[$i % utf8_strlen($password)]));
change to:

Code: Select all

		for ($i = 0; $i < strlen($password); $i++) {
			$data[$i] = ord(substr($password, $i, 1));
		}

		$output = '';

		for ($i = 0; $i < strlen($string); $i++) {
    		$output .= chr(ord(substr($string, $i, 1)) ^ ($data[$i % strlen($password)]));
And to be on the safe side in case Sage Pay returns any characters greater than 127.

find:

Code: Select all

$output = $this->simpleXor($string, $password);
change to:

Code: Select all

$output = utf8_encode($this->simpleXor($string, $password));
Thanks

ok done.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by lv2dr65 » Fri Feb 24, 2012 11:59 am

There is a minor error in the Admin/Extensions/Order Totals/Handling Fee

OC 1.5.1.3.1

the error:
Notice: Undefined variable: entry_tax in /home/xingbot/public_html/admin/view/template/total/handling.tpl on line 28

Also found one on Low Order Fee

Notice: Undefined variable: entry_tax in /home/hobby/public_html/admin/view/template/total/low_order_fee.tpl on line 28

User avatar
New member

Posts

Joined
Sat Jul 30, 2011 2:32 am

Post by Daniel » Sun Feb 26, 2012 12:09 am

its already been fixed in the svn.

everything's pretty much done now. i think i can get a release next week.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Johnathan » Sun Feb 26, 2012 2:46 am

Daniel wrote:its already been fixed in the svn.

everything's pretty much done now. i think i can get a release next week.
Great!

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Renato Frota » Sun Feb 26, 2012 8:58 pm

Daniel,

I'm a moderator in OpenCart Brasil community (http://www.opencartbrasil.com.br/forum).

An expressive number of users are opening support threads regarding the $special price overriding volume prices.

I'd research that most of them doesn't even use groups. It's just because here, in brazil, it's well common to have all (yes, I meant ALL) products advertised as special!! It's just the common pratice here (not only in webstores, but in the phisical ones as well). See an example (most than half are specials in this store): http://www.sosparaiba.com.br. And, to not restrict to an OpenCart, new store, see also these stores (in the list of top webstores in Brazil): http://www.submarino.com.br, http://www.americanas.com.br, http://www.extra.com.br

In OpenCart, if a product price is $120 in special for $100, a volume discount for $90 doesn't apply in ANY case, no matter if it's for a wholesale group (or any other) or for default/guest customers.

The fix is SO SIMPLE, in system/library/cart.php,
find

Code: Select all

if ($product_special_query->num_rows) {
replace

Code: Select all

if ($product_special_query->num_rows && ($product_special_query->row['price'] < $price)) {
Then, I reforce, PLEASE, change this behaviour, or we will continue having new threads about this every week (or day.. we are breaking our online members records frequently!).

Thanks.

New member

Posts

Joined
Wed Aug 31, 2011 1:21 pm

Post by solojuve1897 » Sun Feb 26, 2012 9:58 pm

*Updated*
Last edited by solojuve1897 on Sun Mar 04, 2012 8:17 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Jun 03, 2011 1:00 am

Post by Maansy » Wed Feb 29, 2012 3:19 pm

Daniel wrote:its already been fixed in the svn.

everything's pretty much done now. i think i can get a release next week.
This is great news :)

ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by rubylily » Wed Feb 29, 2012 7:52 pm

Not sure if this is a bug or not, but when I add my Meta Tag Description in the Admin it does not show up on the home page. I using 1.5.1.3.1. The category tags show up on the category pages no problem.

Newbie

Posts

Joined
Tue Feb 14, 2012 5:56 am

Post by JNeuhoff » Thu Mar 01, 2012 6:23 pm

rubylily wrote:Not sure if this is a bug or not, but when I add my Meta Tag Description in the Admin it does not show up on the home page. I using 1.5.1.3.1. The category tags show up on the category pages no problem.
Works fine on a standard Opencart 1.5.1.3, unable to reproduce your error.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Thu Mar 01, 2012 6:37 pm

The direct payment methods, such as catalog/controller/payment/pp_pro.php, need to be made more robust for the function send. What frequently happens, is this: Customer clicks on the final 'Confirm Order', an ajax call to the send method is triggered, and when even simple things go wrong in there, such as an unexpected 'PHP Notice' or 'PHP Warning' message, the json response gets corrupted, even though the payment may have gone through successfully. The customer sees an endless 'Please Wait', and might end up doing multiple payments for the same order. I suggest the following bugfix, where PHP Notices or Errors are caught and handled in a proper Exception handler, see example below for PayPal PRO:

Code: Select all

class PaymentPPProErrorHandler  
{  
	/** 
	* catches php errors / warnings / notices and throws 
	* an exception instead 
	* 
	* @param int $errNo 
	* @param string $errStr 
	*/  
	public static function handle($errNo, $errStr=NULL)  
	{  
		switch ($errNo) {  
			case E_WARNING:  
				throw new RuntimeException($errStr,$errNo);  
				break;  
			default:  
				throw new Exception($errStr,$errNo);  
				break;  
		}  
	}  
	
	/** 
	* Overwrites the PHP error handler and uses our own 
	* 
	*/  
	public static function set()  
	{  
		set_error_handler(array(__CLASS__ , 'handle'));  
	}      
}  

class ControllerPaymentPPPro extends Controller {
	..........
	public function send() {

		PaymentPPProErrorHandler::set();
		try {
			..........
		}
		catch (Exception $e) {
			$msg = "PHP Exception: ".($e->getMessage())." in ".($e->getFile())." on line ".($e->getLine());
			$this->log->write( $msg );
			if (!isset($json)) {
				$json = array();
			}
			$json['exception'] = $msg;
			if (!isset($json['success'])) {
				if (!isset($json['error'])) {
					$json['error'] = "Payment could not be processed because of server error:\n".$msg;
				}
			}
		}
		restore_error_handler();
			
		$this->response->setOutput(json_encode($json));
	}
}

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by SelfMan » Fri Mar 02, 2012 8:39 am

Daniel OpenCart doesn't send notifications of product returns requests, nor does it send notifications of new product reviews. Are you planning to add this functionality to OC? I know that this is more a feature request then a Bug, but I consider it more as a missing feature as we are not checking for returns regullary.

I know that there is a module for that, but shouldnt this be directly in OC?

New member

Posts

Joined
Thu Dec 01, 2011 8:01 am

Post by lv2dr65 » Fri Mar 02, 2012 8:31 pm

Typo in Admin/System. When using www. in multi store setup the 2nd store's add_to_cart buttons will not work on index page.

OC 1.5.1.3.1

The error:
XMLHttpRequest cannot load http://www.sportinggoods.hobbyjunkie.co ... art/update Origin http://sportinggoods.hobbyjunkie.com is not allowed by Access-Control-Allow-Origin.

Noticed same problem on beta 1.5.2

BTW, setting up a 2nd store in OC 1.5.3.1 is a nightmare of epic proportions...

Image

User avatar
New member

Posts

Joined
Sat Jul 30, 2011 2:32 am

Post by matts118 » Sat Mar 03, 2012 7:09 am

Hi. I found a bug, and also fixed it. The USPS module gives incorrect values for foreign currencies as it multiplies the US$ value twice. It isn't so noticeable with Euros etc as they are already close to the US$, but if you have Yen or Hungarian Forints, you get shipping equivalents of thousands of dollars.

The fix is:

go to catalog/model/shipping/usps.php

find this line (it occurs several times)
'text' => $this->currency->format($this->tax->calculate($this->currency->convert($cost, 'USD', $this->currency->getCode()), $this->config->get('usps_tax_class_id'), $this->config->get('config_tax')))

replace with
'text' => $this->currency->format($this->tax->calculate($cost, $this->config->get('usps_tax_class_id'), $this->config->get('config_tax')))

find
'cost' => $this->currency->convert($cost, 'USD', $this->config->get('config_currency')),

replace with
'cost' => $cost,

The problem is this $this->currency->convert() converts the currency from US$, and then the format() function does it again, so the initial US$ number is multiplied twice by the new currency. So need to remove the $this->currency->convert().

Newbie

Posts

Joined
Mon Dec 12, 2011 2:41 am

Post by Daniel » Sat Mar 03, 2012 3:58 pm

lv2dr65 wrote:Typo in Admin/System. When using www. in multi store setup the 2nd store's add_to_cart buttons will not work on index page.

OC 1.5.1.3.1

The error:
XMLHttpRequest cannot load http://www.sportinggoods.hobbyjunkie.co ... art/update Origin http://sportinggoods.hobbyjunkie.com is not allowed by Access-Control-Allow-Origin.

Noticed same problem on beta 1.5.2

BTW, setting up a 2nd store in OC 1.5.3.1 is a nightmare of epic proportions...

Image

this is not a bug just you not using sub domains properly. you don't use www for sub domains!

http://www.maindomain.com
http://subdomainj.maindomain.com

its not a nightmare. its the same as any other script that can run multiple domains.

also its always better to have different domains posted to the same install and not use sub domains.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Calcite » Sat Mar 03, 2012 10:34 pm

I have been deliberating whether to post this as a bug or not.

Sorry if it is not a bug but here goes...

This may be due to me being a newbie, but I seem to have a problem with running OC 1.5.1.3 on Localhost as far as sales reports go.

I have created accounts and done some test shopping.

The orders show up OK in the Admin panel, ,but if I look in Reports>Sales<Orders nothing shows up if I filter by "All Statuses"

If I changed status of an order to processed, shipped, etc. and filter on that status it shows OK.

Is this the way it is meant to work or should "All Statuses" find everything?

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by storm-cloud » Sun Mar 04, 2012 11:35 am

Not 100% sure if this is a bug but thought this would be a good place to start.

I have found that the search box at the top of the store only references one word. For example, if I enter "Word A" and "Word B", the results appear. Then if I change "Word B" even if the word is gibberish, the results stay the same.

Now I have products that "Word A" is the same but "Word B" is different, but if I search with the two words, the results are the nearly same (the order changes slightly but the two word match is not being prioritised in any way). It seems that the search is not paying attention to "Word B" at all.

Surely if I search for a two word string that matches a product with both words, then the products matching with both words should show up at the top of the results list, and those products only matching with one word should be filtered out or placed at the end of the list?

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by solojuve1897 » Sun Mar 04, 2012 8:18 pm

*Reposted* - Is there no fix for this?

Do the following:

First: Have a clean install of OpenCart 1.5.1.3

1. Put something in the cart.

2. Go to checkout

3. Choose Register account

4. Input all your details and uncheck "My delivery and billing addresses are the same."

5. Choose "I want to use a new address" and input your details

6. Complete the order.

7. Go to the admin and check the new order.

8. Choose "Payment Details"

The bug: The payment details are empty!

It's really strange that this hasnt been reported before? Or maybe it has? It's kind of a big bug. What to do to fix this issue?

Image

Newbie

Posts

Joined
Fri Jun 03, 2011 1:00 am

Post by JNeuhoff » Mon Mar 05, 2012 3:36 am

Calcite wrote:I have been deliberating whether to post this as a bug or not.

Sorry if it is not a bug but here goes...

This may be due to me being a newbie, but I seem to have a problem with running OC 1.5.1.3 on Localhost as far as sales reports go.

I have created accounts and done some test shopping.

The orders show up OK in the Admin panel, ,but if I look in Reports>Sales<Orders nothing shows up if I filter by "All Statuses"

If I changed status of an order to processed, shipped, etc. and filter on that status it shows OK.

Is this the way it is meant to work or should "All Statuses" find everything?
This is a known bug, reported earlier in this bugthread.

Try attached bugfix for 1.5.1.3:

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 62 guests