Posts

Showing posts with the label 3.0.2.0

Opencart 3.0.2.0 While refereshing Theme cache and SASS cache

I was getting error : Trying to access array offset on value of type null in C:\xampp\htdocs\testoc3020\storage\vendor.scss.inc.php on line 1753 Solution : I changed the code in following file in [your opencart storage folder] /vendor/scss.inc.php in following function. code changed is orange color. protected function sortArgs($prototype, $args) { $keyArgs = array(); $posArgs = array(); foreach ($args as $arg) { if(is_array($arg)){ list($key, $value) = $arg; } else { $value = ""; } $key = (is_array($key) && isset($key[1])) ? $key[1] : null; if (empty($key) || is_null($key)) { $posArgs[] = $value; } else { $keyArgs[$key] = $value; } } if (!isset($prototype)) return $posArgs; $finalArgs = array(); foreach ($prototype as $i => $names) { if (isset($posArgs[$i])) { $finalArgs[] = $posArgs[$i]; continue; } $set = false; foreach ((array)$names as $name) { if (isset($k

Opencart Checkout Error iso_code_2 Undefined or iso_code_3 Undefined regarding UPS and USPS shipping method

Hi, if you getting any error like  iso_code_2 Undefined or iso_code_3 Undefined in opencart version 2.3.0.2 regarding UPS and USPS shipping method. or like this error Notice: Undefined index: iso_code_2 in /home/aromis5/public_html/catalog/model/extension/shipping/usps.php on line 36Notice: Undefined index: iso_code_2 in /home/aromis5/public_html/catalog/model/extension/shipping/usps.php on line 286Notice: Undefined index: iso_code_2 in /home/aromis5/public_html/catalog/model/extension/shipping/ups.php on line 147Notice: Undefined index: iso_code_2 in /home/aromis5/public_html/catalog/model/extension/shipping/ups.php on line 147 ------------------------------------------ Notice: Undefined index: iso_code_2 in /home/aromis5/public_html/catalog/model/extension/shipping/usps.php on line 36Notice: Undefined index: iso_code_2 in /home/aromis5/public_html/catalog/model/extension/shipping/usps.php on line 286Notice: Undefined index: iso_code_2 in /home/aromis5/public_html/catalog/model

Cant use dump() function in twig files or how to enable debug in opencart twig or print_r alternate use dump() in opencart 3.0

if you are facing the following problem. Cant use dump() function in twig files  or  how to enable debug in opencart twig  or  print_r alternate use dump() in opencart 3.0 for fixing this problem follow these steps You can activate dump() function for twig environment by following these steps in opencart 3.0 : Go to system/library/template/Twig/Environment.php Here in the constructor function, you can find $options array . Set 'debug' option to 'true' . Now we need to include debug extension, so add $this->addExtension(new Twig_Extension_Debug()); below. Now you can use  {{ dump(your_variable_name) }} as print_r variable in php That's all 😅😆😛

Opencart version 3.0.2.0 session logout issue

/Hey This is the problem detail written by someone else. ----------------------------------- I'm running my new online store on version 3.0.2.0 and the majority appears to be running smoothly however when I log out I am seeing the following; Account You have been logged off your account. It is now safe to leave the computer. Your shopping cart has been saved, the items inside it will be restored whenever you log back into your account. And then finding I can access my account (as if I was still logged in) by simply clicking on 'My Account' without entering any login information. I'm certain it shouldn't be doing that but haven't got any idea how to go about resolving the problem. Hope someone can help because it's driving my mad trying to fix it!!!! ??? Thanks everyone ;D ----------------------------------- so I found the latest version session file and add this code and problem solved File Name : system->library->session.php