Forum
Shipping Zone - Cart Error
We have two Perch Shop sites that had been working with shipping prior to Perch Shop 1.0, but since updating we are experiencing some problems with Zones. In the Perch documentation it says to setup a default zone, which we have done, to enable shipping calculations and as soon as we do, the shipping calculations fail. We can't get shipping without zones, but with the zone, an exception is thrown. Creating a zone works fine.
Error
Notice: Undefined index: zones in /var/www/vhosts/www.lyndenhouse.net/public/admin/addons/apps/perch_shop/lib/PerchShop_Shippings.class.php on line 32
...
$shipping =
array (size=37)
'title' => string 'Purolator' (length=9)
'slug' => string 'purolator' (length=7)
'company' => string 'Purolator' (length=9)
'description' =>
array (size=3)
'_flang' => string 'markdown' (length=8)
'raw' => string '' (length=0)
'processed' => string '' (length=0)
'price' =>
array (size=1)
26 => string '15.25' (length=5)
'price_min' =>
array (size=1)
26 => string '1' (length=1)
'price_max' =>
array (size=1)
26 => string '' (length=0)
'tax_group' => string '1' (length=1)
'weight_min' => string '1' (length=1)
'weight_max' => string '500' (length=3)
'width_max' => string '20' (length=2)
'height_max' => string '20' (length=2)
'depth_max' => string '20' (length=2)
'status' => string '1' (length=1)
'shippingID' => string '2' (length=1)
'shippingTitle' => string 'Purolator' (length=9)
'shippingSlug' => string 'purolator' (length=7)
'shippingDynamicFields' => string '{"title":"Purolator","slug":"hahahah","company":"Purolator","description":{"_flang":"markdown","raw":"","processed":""},"price":{"26":"15.25"},"price_min":{"26":"1"},"price_max":{"26":""},"tax_group":"1","weight_min":"1","weight_max":"500","width_max":"20","height_max":"20","depth_max":"20","status":"1"}' (length=305)
'shippingCreated' => string '2015-12-16 16:02:15' (length=19)
'shippingUpdated' => string '2016-04-15 16:14:09' (length=19)
'shippingDeleted' => null
'perch_title' => string 'Purolator' (length=9)
'perch_slug' => string 'purolator' (length=7)
'perch_company' => string 'Purolator' (length=9)
'perch_description' =>
array (size=3)
'_flang' => string 'markdown' (length=8)
'raw' => string '' (length=0)
'processed' => string '' (length=0)
'perch_price' =>
array (size=1)
26 => string '15.25' (length=5)
'perch_price_min' =>
array (size=1)
26 => string '1' (length=1)
'perch_price_max' =>
array (size=1)
26 => string '' (length=0)
'perch_tax_group' => string '1' (length=1)
'perch_weight_min' => string '1' (length=1)
'perch_weight_max' => string '500' (length=3)
'perch_width_max' => string '20' (length=2)
'perch_height_max' => string '20' (length=2)
'perch_depth_max' => string '20' (length=2)
'perch_status' => string '1' (length=1)
'zones' =>
array (size=0)
empty
'sort_price' => string '15.25' (length=5)
Diagnostic Report
Perch: 2.8.29, PHP: 5.6.7-1+deb.sury.org~trusty+1, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_forms (1.8.3), perch_shop_orders (1.0), perch_shop_products (1.0), perch_shop (1.0), perch_members (1.5)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_members', 'perch_forms', 'perch_shop', );
PERCH_LOGINPATH: /admin
PERCH_PATH: /var/www/vhosts/www.lyndenhouse.net/public/admin
PERCH_CORE: /var/www/vhosts/www.lyndenhouse.net/public/admin/core
PERCH_RESFILEPATH: /var/www/vhosts/www.lyndenhouse.net/public/admin/resources
Image manipulation: GD Imagick
PHP limits: Max upload 256M, Max POST 256M, Memory: 512M, Total max file upload: 256M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: lyndenhouse.dev
DOCUMENT_ROOT: /var/www/vhosts/www.lyndenhouse.net/public
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Which version of the gamma did you update from?
For the one website (Lyndenhouse) we upgraded from Gamma 25, for the other (Ridgetec) we updated from Gamma 33. Hope that helps!
You need to update from Gamma 33.
We upgraded from Gamma 33 to version 1 on Ridgetec and that didn't work.
I just tried overwriting Gamma 33 on Lyndenhouse, running the Update-gamma.php (which succeeded), and overwriting with version 1, and we are still getting the same errors.
Any other ideas on what we are missing?
What shipping zones do you have configured?
Just one default shipping zone (in our case, Canada is checked), and it is marked as active. We have two methods of shipping defined as well.
I don't know if this will help, but this is the full error output:
We finally figured it out Drew - the shipping template price id had changed somewhere along the way and we hadn't updated it's name in the templates!
became
Sorry for the trouble!