Forum

Thread tagged as: Shop

Undefined index: shipping_without_tax

Hi, when checking out I get these messages.

Notice: Undefined index: shipping_without_tax in /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/addons/apps/perch_shop/lib/PerchShop_Orders.class.php on line 49

Notice: Undefined index: shipping_tax in /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/addons/apps/perch_shop/lib/PerchShop_Orders.class.php on line 51

Notice: Undefined index: shipping_with_tax in /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/addons/apps/perch_shop/lib/PerchShop_Orders.class.php on line 53

Notice: Undefined index: shipping_tax_rate in /nfs/c05/h06/mnt/78335/domains/shop.stylishlittleme.com/html/perch/addons/apps/perch_shop/lib/PerchShop_Orders.class.php on line 69

looked at the shop settings etc. I can't find where I can set these...

thanks in advance

tony

Tony Monckton

Tony Monckton 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you using shipping? Have you set shipping locations? Has the customer selected a shipping location?

I'll need to know something about what you're doing to be able to help.

Hi Drew,

shop/shipping I have setup 'Royal Mail Second Class', it setup with price min-max weight etc. And shipping zone is set to UK and is set as default.

Currency is set to GBP.

The product has shipping set to yes, weight/width/height/depth etc.

The customer(me) did not select shipping location, as this was not shown on checkout page. The postage on the checkout page is always £0.00

The cart does not have shipping tax information.

thanks in advance.

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tried setting a shipping location?

hi,

where do I setup the shipping location?

kind regards

tony

Hi,

looks like I need to add:

        <perch:if id="shipping_weight" match="gt" value="0">
                Shipping: <perch:shop id="shipping_method" type="hidden" /> 
                <perch:shop id="shipping_without_tax" type="hidden" format="$:%.2n" />
        </perch:if>

to cart.html

tony

Hi Drew,

I'm using shipping, where is shipping locations setup? (same as shipping zone?) Ive added shipping_method to cart.html

I've been looking for where i can set the shipping location ( is this the same as shipping Zone?). Ive exported mwSQL dump, the tables for shipping...

it's all looks setup. I looked through the documentation and checked I have it all setup.

please help

tony

INSERT INTO `perch2_shop_shipping_zone_countries` VALUES (1,1,236);

INSERT INTO `perch2_shop_shipping_zones` VALUES (1,'UK','uk',1,1,'{\"title\":\"UK\",\"slug\":\"uk\",\"description\":{\"_flang\":\"markdown\",\"raw\":\"United Kingdom\",\"processed\":\"<p>United Kingdom<\\/p>\"},\"status\":\"1\",\"countries\":[\"236\"]}','2016-07-07 15:06:16','2016-07-07 15:06:16',NULL);

INSERT INTO `perch2_shop_shippings` VALUES (1,'Royal Mail Second Class','royal-mail-second-class',1,'{\"title\":\"Royal Mail Second Class\",\"slug\":\"royal-mail-second-class\",\"company\":\"Royal Mail\",\"description\":{\"_flang\":\"markdown\",\"raw\":\"\",\"processed\":\"\"},\"price\":{\"zones\":[\"1\"],\"z1\":{\"47\":\"2.85\"}},\"tax_group\":\"1\",\"price_max\":{\"47\":\"0.00\"},\"price_min\":{\"47\":\"1\"},\"weight_min\":\"0\",\"weight_max\":\"2\",\"width_max\":\"45\",\"height_max\":\"35\",\"depth_max\":\"6\",\"status\":\"1\"}','2016-07-07 15:03:53','2016-08-04 10:37:30',NULL);

cart.html

<perch:if id="product_count" match="gt" value="0">
    <perch:cartitems>
        <div id="item_<perch:cartitem id="identifier" />" class="myCart_item">
            <div class="myCart_wrap" style="background-color:">
                <perch:form id="cart" app="perch_shop">
                    <perch:input type="submit" value="Update" hidden="true" aria-hidden="true" />
                    <div class="myItem_image">
                        <perch:cartitem id="image" type="image" height="375" crop="true" output="tag" />
                    </div>
                    <div class="myItem_title">
                        <h3><perch:cartitem id="title" /></h3>
                    </div>
                    <div class="myItem_desc">
                        <div style="width:95%;">
                            <h5 style="line-height:20px;"><perch:cartitem id="description" type="textarea" markdown="true" /></h5>
                        </div>
                        <div style="width:95%;">
                            <h5 style="line-height:20px;"><perch:cartitem id="variant_desc" /></h5>
                        </div>
                    </div>
                    <div class="myItem_prices">
                        <table class="myItem_prices" style="float:left;width:95%" border=0 >
                            <tr>
                                <td>Qty:</td>
                                <td>
                                    <perch:input id="qty_<perch:cartitem id="identifier" />" value="<perch:cartitem id="quantity" />" type="number" min="0" style="width:100px;"/>
                                </td>
                            </tr>
                            <tr><td>Price:</td><td><perch:cartitem id="price_without_tax" /></td></tr>
                            <tr><td>Total:</td><td><perch:cartitem id="total_without_tax_formatted" /></td></tr>
                            <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
                            <tr><td>&nbsp;</td><td><button id="<perch:cartitem id="identifier" />" type="submit" >remove</button></td></tr>
                        </table>
                    </div>
                    <div>
                        <perch:if id="shipping_weight" match="gt" value="0">
                            Shipping: <perch:shop id="shipping_method" type="hidden" /> 
                            <perch:shop id="shipping_without_tax" type="hidden" format="$:%.2n" />
                        </perch:if>
                    </div>
                </perch:form>
            </perch:cartitems>
        </div>
    </div>
</perch:if>

Drew McLellan

Drew McLellan 2638 points
Perch Support

Right - shipping zones.

Can you turn on debug and show me what it outputs for your cart page, after clicking Update on your cart?

Hi Drew,

when I add an item to cart. it goes to checkout.php.. output below

Rejecting shipping method ‘Royal Mail Second Class’ because: cart value is less than minimum for this shipping type Cart value: 0.02. Shipping min price: 1

ok, that explains it!

thanks Drew

tony

SELECT * FROM perch2_pages WHERE pagePath='/checkout.php' LIMIT 1
[1] SELECT * FROM perch2_shop_cart WHERE cartID=224
[1] SELECT * FROM perch2_shop_cart WHERE cartID=224
[32] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT * FROM perch2_shop_products WHERE productID=NULL AND productDeleted IS NULL LIMIT 1
[1] SELECT itemID, itemQty FROM perch2_shop_cart_items WHERE cartID=224 AND productID=0
[1] SELECT * FROM perch2_shop_products WHERE productID=0 AND productDeleted IS NULL LIMIT 1
Limiting based on stock.
------------------------------ Calculating cart ------------------------------
[1] SELECT * FROM perch2_shop_cart WHERE cartID=224
[1] SELECT * FROM perch2_shop_cart WHERE cartID=224
[1] SELECT * FROM perch2_shop_tax_locations WHERE locationID=1 AND locationDeleted IS NULL LIMIT 1
[1] SELECT locationID FROM perch2_shop_tax_locations WHERE locationIsHome=1 LIMIT 1
[1] SELECT * FROM perch2_shop_tax_locations WHERE locationID=1 AND locationDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_currencies WHERE currencyID=47 LIMIT 1
[1] SELECT COUNT(productID) AS product_count, SUM(itemQty) AS item_count FROM perch2_shop_cart_items WHERE cartID=224
Tax mode: inc
[1] SELECT * FROM perch2_shop_cart_items WHERE cartID=224 ORDER BY itemID ASC
[1] SELECT * FROM perch2_shop_products WHERE productID=37 AND productDeleted IS NULL LIMIT 1
[1] SELECT * FROM perch2_shop_tax_groups WHERE groupID=1 AND groupDeleted IS NULL LIMIT 1
[0] SELECT r.rateValue FROM perch2_shop_tax_group_rates gr, perch2_shop_tax_rates r WHERE gr.rateID=r.rateID AND gr.groupID=1 AND gr.locationID=1
[1] SELECT z.* FROM perch2_shop_shipping_zones z LEFT JOIN perch2_shop_shipping_zone_countries c ON z.zoneID=c.zoneID WHERE z.zoneActive=1 AND z.zoneDeleted IS NULL AND (c.countryID=236 OR zoneIsDefault=1) ORDER BY zoneIsDefault ASC LIMIT 1
[1] SELECT * FROM perch2_shop_shippings WHERE shippingDeleted IS NULL ORDER BY shippingOrder ASC
[1] SELECT * FROM perch2_shop_shipping_zones WHERE zoneDeleted IS NULL AND zoneActive=1 AND zoneID IN (1)
[1] SELECT rateID AS id, rateTitle AS title, rateValue AS rate, locationID FROM perch2_shop_tax_rates WHERE rateDeleted IS NULL ORDER BY rateValue DESC
Rejecting shipping method ‘Royal Mail Second Class’ because: cart value is less than minimum for this shipping type
Cart value: 0.02. Shipping min price: 1
[nil] SELECT * FROM perch2_shop_promotions WHERE promoFrom<='2016-08-05 13:11:00' AND promoTo>'2016-08-05 13:11:00' AND promoActive=1 AND promoDeleted IS NULL ORDER BY promoOrder ASC
UPDATE perch2_shop_cart SET cartTotalItems='1', cartTotalProducts='1', cartTotalWithTax='0.02', cartTotalWithoutTax='0.02' WHERE cartID='224'
INSERT INTO perch2_shop_cart_data(cartID,productID,cartData) VALUES('224',NULL,'{\"opt-3\":[\"7\"],\"productID\":\"37\"}')

Hi, I've found one other setting, that stopped the cart/shipping from working. The shipping details for 'Royal Mail Second Class', max order value was 0.

all works now

tony