The code changes posted were for v1.3.8. They are already built-in to v1.3.9.
The code changes posted were for v1.3.8. They are already built-in to v1.3.9.
.
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.
Thanks for the reply, Dr. Byte. We have 1.3.9h running but the SGS errors have showed up precisely following the upgrade from 1.3.7 a little less than a year ago. I tried commenting out the chunk of code, but it resulted in a blank white page after clicking the 'Checkout' link.
For v1.3.9h, if you want to skip sending attribute data, remove this block of code:Code:if (isset($order->products[$i]['attributes'])) { $options_text_length = 0; for ($j=0, $m=sizeof($order->products[$i]['attributes']); $j<$m; $j++) { $options_text_length += strlen($order->products[$i]['attributes'][$j]['option'] . $order->products[$i]['attributes'][$j]['value']); } if ($options_text_length < 128) { for ($j=0, $m=sizeof($order->products[$i]['attributes']); $j<$m; $j++) { $myorder["items"][$num_line_items]['options' . $j]['name'] = substr(htmlentities($order->products[$i]['attributes'][$j]['option'], ENT_QUOTES, 'UTF-8'), 0, 128); $myorder["items"][$num_line_items]['options' . $j]['value'] = substr(htmlentities($order->products[$i]['attributes'][$j]['value'], ENT_QUOTES, 'UTF-8'), 0, 128); } } }
.
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.
Thanks for the reply, Dr. Byte. I tried commenting out the whole chunk of code as posted by you. Now I am getting the following on step 3 of the checkout process -
Server error
The website encountered an error while retrieving https://rastaheadwraps.com/index.php...eckout_payment. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
Before there was a blank white page on clicking 'Checkout' whereas now I am getting a 500 error on step 3 of checkout. I am reverting to default code again for now. I appreciate your efforts.
Removing the code I quoted won't cause a 500 error. At least, it doesn't for me. And doesn't make sense that it would anyway.
Sounds more like a server error.
In addition to removing that section of code to prevent sending attribute data, you could also make the following change so that the product ID is shorter and doesn't reflect the presence of attributes:Code:$myorder["items"][$num_line_items]['id'] = (int)$order->products[$i]['id'];
.
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.
I am so sorry, Dr. Byte. I did not notice the scrollbar at first on your code. I had ended the comment after 1 curly bracket, instead of all 3 curly brackets at the end. Now, with the commenting out being done correctly, the 500 error is not occurring. Checkout process is going through smoothly to 'Confirm Order' step, using the CC method of payment.
All we are waiting for now is to see if the SGS 005000 error stops recurring. I will give it till the end of January and if no further SGS 005000 errors appear I will call it a success! At present, usually about 4-6 sales per week are being blocked by it.
THANK YOU!