Forums / Upgrading to 1.5.x / iridium card payment module throwing up error after upgrade

iridium card payment module throwing up error after upgrade

Started by xbox_memberships on 19 Sep 2012, 4:41 PM · Views: 1,694

Results 1 to 9 of 9
19 Sep 2012, 4:41 PM
#1
xbox_memberships avatar

xbox_memberships

Zen Follower

Join Date:
Jan 2010
Posts:
157
Plugin Contributions:
0

iridium card payment module throwing up error after upgrade

i upgraded my site a while back but have had no reported problems from customers howeve i have recently had to check my checkout procedure on my website as a customer reported strange writing after pressing confirm order and the payment was being processed, i activated a test product at 1p and checkout when i do checkout i get the attached screenshot.

Attachment 11164

the order.php file shows this part to be responsible...

// for low stock email

          if ( $stock_left <= STOCK_REORDER_LEVEL ) {

            // WebMakers.com Added: add to low stock email

            $this->email_low_stock .=  'ID# ' . zen_get_prid($this->products[$i]['id']) . ', ' . $this->products[$i]['model'] . ', ' . $this->products[$i]['name'] . ', ' . 'Stock: ' . $stock_left . "\n\n";

          // kuroi: trigger and details for attribute low stock email

          } elseif ($attribute_stock_left <= STOCK_REORDER_LEVEL) {

            $this->email_low_stock .=  'ID# ' . zen_get_prid($this->products[$i]['id']) . ', ' . $this->products[$i]['model'] . ', ' . $this->products[$i]['name'] . ', ';

                                                                                                foreach($this->products[$i]['attributes'] as $attributes){

                                                                                                                $this->email_low_stock .= $attributes['option'] . ': ' . $attributes['value'] . ', ';

                                                                                                }

                                                                                                $this->email_low_stock .= 'Stock: ' . $attribute_stock_left . "\n\n";

          }

cananyone help me im a noob at coding and the company who does the card processing wont help as it appears to be "the templates fault" card payments process fine and the order goes through btw the screenshot is what happens instead of redirecting to the checkout successful page obviously this doesnt look good for the customers who do choose to place an order

19 Sep 2012, 5:58 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,899
Plugin Contributions:
22

Re: iridium card payment module throwing up error after upgrade

Even using trifocals and an image zoomer, I can't see the error. We need more information and a link to your site. You can post it as yoursiteDOTcom.

Also, if you'll answer as many of the posting tip questions as you can. Maybe even tell us the version.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

19 Sep 2012, 10:16 PM
#3
xbox_memberships avatar

xbox_memberships

Zen Follower

Join Date:
Jan 2010
Posts:
157
Plugin Contributions:
0

Re: iridium card payment module throwing up error after upgrade

I'm using zen 1.5 and my website is wwwdotcrazygamerdotcodotuk the error basically says an invalid argument has been supplied from xboxmemb/includes/orders.php on line 778 and the line refers to product low stock lines, the only way to see the error is by actually checking out using the card payment option and confirming the order so the order goes through fine just I know I'd be concerned if I saw that on a website after making payment. Being on my mobile at the moment I can't read the posting q's that are suggested. Also can you not just click the image to make it bigger? I'm sure the last time I posted a photo here you could view it larger??

20 Sep 2012, 9:36 AM
#4
xbox_memberships avatar

xbox_memberships

Zen Follower

Join Date:
Jan 2010
Posts:
157
Plugin Contributions:
0

Re: iridium card payment module throwing up error after upgrade

ive just got this reply from the tech support guy from the card company.....

Hi,

 

I’ve just taken another look at our order.php file, which is a default install of Zen 1.5 and It doesn’t contain the section where it’s erroring.

 

It’s this section that isn’t in the default install of Zen:

          // kuroi: trigger and details for attribute low stock email

          } elseif ($attribute_stock_left <= STOCK_REORDER_LEVEL) {

            $this->email_low_stock .=  'ID# ' . zen_get_prid($this->products[$i]['id']) . ', ' . $this->products[$i]['model'] . ', ' . $this->products[$i]['name'] . ', ';

                                                                                                foreach($this->products[$i]['attributes'] as $attributes){

                                                                                                                $this->email_low_stock .= $attributes['option'] . ': ' . $attributes['value'] . ', ';

                                                                                                }

                                                                                                $this->email_low_stock .= 'Stock: ' . $attribute_stock_left . "\n\n";

          }



I’ve attached a copy of our order.php file so you can take a look for yourself. It’s possible that a 3rd party module has altered this core file. If you compare these 2 files (there’s a handy plugin you can get for notepad++ to compare 2 files) you will see there are many changes to the default version.

 

Thanks

still no idea how to fix this, i know the cause but the solution eludes me....

20 Sep 2012, 1:46 PM
#5
xbox_memberships avatar

xbox_memberships

Zen Follower

Join Date:
Jan 2010
Posts:
157
Plugin Contributions:
0

Re: iridium card payment module throwing up error after upgrade

fixed :) help from a new facebook friend turns out it just needed a slight alteration in the coding.

20 Sep 2012, 2:20 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,899
Plugin Contributions:
22

Re: iridium card payment module throwing up error after upgrade

This is where you help others that might have the same problem by letting everyone know what you did to fix it.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Sep 2012, 3:34 PM
#7
xbox_memberships avatar

xbox_memberships

Zen Follower

Join Date:
Jan 2010
Posts:
157
Plugin Contributions:
0

Re: iridium card payment module throwing up error after upgrade

Sorry as i didnt fix the issue myself i cant really say for definete but this is what i was told in exact wording ```
First add an ending curly brace } after the other on line 780 (make a new line 781), then copy line 725 and place before line 778

20 Sep 2012, 4:33 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: iridium card payment module throwing up error after upgrade

Those code snippets look like they contain references to "attribute stock", which would be an addon that does indeed change core code.

Maybe these symptoms mean you didn't upgrade that plugin?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Sep 2012, 5:58 PM
#9
xbox_memberships avatar

xbox_memberships

Zen Follower

Join Date:
Jan 2010
Posts:
157
Plugin Contributions:
0

Re: iridium card payment module throwing up error after upgrade

I'm thinking that the vworker I hired to actually upgrade my website may have been a cowboy as there are a few glitches about in the sites array of php's