Forum

Thread tagged as: Problem, Shop

perch_shop_order_addresses() issue

I've got an issue on my cart page which is similar to this: https://forum.grabaperch.com/forum/04-22-2016-question-about-perch-shop-order-addresses

What happens is as follows:

  1. Add product to cart
  2. Customer enters details (name, address)
  3. Cart shows billing address
  4. Customer places order, redirects to success page
  5. Success page empties the cart
  6. Customer goes back to shop homepage and decides to add something else to cart
  7. Customer details page is skipped as user is logged in already (fine)
  8. Cart page does not show the billing address anymore

I'm using the passwordless customer create form. Here is the debug for the cart when the billing address is missing:

Debug Message
[1] SELECT * FROM perch2_members_sessions WHERE sessionID='843f9d49ec8f0496a9f183ae465c5f2f246967f1' AND sessionHttpFootprint='7e2c5bbd7a4ee8c1c36fc61458bd395602c6b83e' AND sessionExpires>'2017-03-13 19:01:18' LIMIT 1
User is logged in
[1] SELECT * FROM perch2_pages WHERE pagePath='/pay/confirm.php' LIMIT 1
[1] SELECT * FROM perch2_shop_cart WHERE cartID=120
[1] SELECT * FROM perch2_shop_cart WHERE cartID=120
------------------------------ Calculating cart ------------------------------
[1] SELECT * FROM perch2_shop_cart WHERE cartID=120
[1] SELECT * FROM perch2_shop_cart WHERE cartID=120
[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_customers WHERE memberID=39
[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=120
[40] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
Tax mode: inc
[1] SELECT * FROM perch2_shop_cart_items WHERE cartID=120 ORDER BY itemID ASC
[1] SELECT * FROM perch2_shop_products WHERE productID=8 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
[nil] SELECT * FROM perch2_shop_promotions WHERE promoFrom<='2017-03-13 19:01:00' AND promoTo>'2017-03-13 19:01:00' AND promoActive=1 AND promoDeleted IS NULL ORDER BY promoOrder ASC
Using cart from cache.
Using template: /templates/pages/attributes/seo.html
Using template: /templates/pages/attributes/body.html
[1] SELECT pageID, pageParentID, pageDepth, pageTreePosition FROM perch2_pages WHERE pagePath='/get-tefl-certified' OR pageSortPath='/get-tefl-certified' LIMIT 1
[3] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageTreePosition LIKE '000-005%' ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/pay/confirm.php' LIMIT 1
[2] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-008-005', '000-008', '000') ORDER BY pageTreePosition DESC
[2] Using template: /templates/navigation/pushy.html
[1] SELECT groupID FROM perch2_navigation WHERE groupSlug='tefl-jobs' LIMIT 1
[18] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=1 AND p.pageNew=0 ORDER BY np.pageTreePosition ASC
[0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=1 AND p.pagePath='/pay/confirm.php' LIMIT 1
[18] Using template: /templates/navigation/pushy.html
[1] SELECT groupID FROM perch2_navigation WHERE groupSlug='tefl-internships' LIMIT 1
[4] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=2 AND p.pageNew=0 ORDER BY np.pageTreePosition ASC
[0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=2 AND p.pagePath='/pay/confirm.php' LIMIT 1
[4] Using template: /templates/navigation/pushy.html
[1] SELECT groupID FROM perch2_navigation WHERE groupSlug='volunteer-programs' LIMIT 1
[3] SELECT np.pageID, np.pageParentID, p.pagePath, p.pageTitle, p.pageNavText, p.pageNew, p.pageOrder, np.pageDepth, p.pageSortPath, np.pageTreePosition, p.pageAccessTags, p.pageAttributes FROM perch2_navigation_pages np, perch2_pages p WHERE p.pageID=np.pageID AND np.groupID=3 AND p.pageNew=0 ORDER BY np.pageTreePosition ASC
[0] SELECT np.pageTreePosition FROM perch2_pages p, perch2_navigation_pages np WHERE np.pageID=p.pageID AND np.groupID=3 AND p.pagePath='/pay/confirm.php' LIMIT 1
[3] Using template: /templates/navigation/pushy.html
[1] SELECT pageID, pageParentID, pageDepth, pageTreePosition FROM perch2_pages WHERE pagePath='/community' OR pageSortPath='/community' LIMIT 1
[10] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 AND pageTreePosition LIKE '000-006%' ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/pay/confirm.php' LIMIT 1
[2] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-008-005', '000-008', '000') ORDER BY pageTreePosition DESC
[9] Using template: /templates/navigation/pushy.html
Using template: /templates/search/search_header.html
[5] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/pay/confirm.php' OR regionPage='*' ORDER BY regionPage DESC
Using cart from cache.
[1] Using template: /templates/shop/cart/cart.html
[2] SELECT * FROM perch2_categories ORDER BY catTreePosition ASC
[1] SELECT billingAddress, shippingAddress FROM perch2_shop_cart WHERE billingAddress IS NOT NULL AND cartID=120
Using template: /templates/shop/gateways/stripe_payment_form.html
Stephen Turvey

Stephen Turvey 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You'll need to have the customer select their address as one of your checkout steps if it's not been selected at the point they created it.