Thread tagged as: Problem, Shop

Add to cart works in Safari, not in Firefox or Chrome...


I haven't seen this before...

My add to cart button is only working in Safari... Any guidance on troubleshooting would be much appreciated...

My product template looks like this:

<div class="panel panel-default events-meta">
<div class="panel-heading">
    <h3 class="panel-title">Tickets:</h3>
<div class="panel-body">
<perch:form id="add_to_cart" app="perch_shop" class="cart nobottommargin clearfix" action="/cart" >

    <perch:if exists="has_variants">
            <div class="col_full">    
        <perch:input id="product" type="select" class="sm-form-control bottommargin-sm" env-autofill="false" options="<perch:shop id="_variant_opts" type="hidden" />" placeholder="Please choose" required="true" class="sm-form-control" />
         <perch:else />
               <perch:input id="product" type="hidden" env-autofill="false" value="<perch:shop id="productID" type="hidden" />" />

    <div class="quantity clearfix" style="margin-right: 0px;">
        <div class="col_full nobottommargin">
        <perch:label for="qty">Quantity</perch:label>
        <div class="col_full">
        <input type="button" id="sub" value="-" class="minus">
        <perch:input id="qty" value="1" class="qtyfull" />
        <input type="button" id="add" value="+" class="plus">
    <button class="button button-border button-circle button-dark col_full topmargin-sm"><i class="icon-shopping-cart"></i><span> Add to Cart</span></button>
    <perch:input type="cms" />


$('.plus').click(function () {
    $(this).prev().val(+$(this).prev().val() + 1);
$('.minus').click(function () {
    if ($(this).next().val() > 0) $(this).next().val(+$(this).next().val() - 1);

My diagnostic looks like this:

Perch: 2.8.34, PHP: 5.6.29, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), jw_activity_log (1.0.0), dh_ga (1), perch_blog (5.0), ui_checkout (1.0), perch_events (1.9.2), perch_forms (1.8.3), perch_gallery (2.8.6), perch_mailchimp (2.0.1), perch_newsfeed (1), perch_shop_orders (1.0.12), perch_shop_products (1.0.12), perch_shop (1.0.12), perch_comments (1.1), perch_members (1.5), pepperjack_tags (0.9), perch_backup (1.2), perch_twitter (3.5.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_events', 'perch_mailchimp', 'perch_forms', 'perch_twitter', 'perch_gallery', 'ui_checkout', 'perch_members', 'perch_shop', 'dh_member_profiles' );
PERCH_PATH: /home/gmfgloucester/
PERCH_CORE: /home/gmfgloucester/
PERCH_RESFILEPATH: /home/gmfgloucester/
Image manipulation: GD Imagick
PHP limits: Max upload 64M, Max POST 65M, Memory: 90M, Total max file upload: 64M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /home/gmfgloucester/
Monty Lewis

Monty Lewis 2 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That sounds very much like a front end code issue.

Have you tried stripping it down to a simple example?

I'll do that now... I made some changes yesterday on the cart page, I think I'll undo those and see if I can get it to work...

Is cart written to php session?


Drew McLellan

Drew McLellan 2638 points
Perch Support

The contents of the cart are stored in the database. The ID of that cart is held in the session.


So I'm getting things to show in cart, but then moving to the next step in checkout, register, the total is resetting to zero... Wondering if it's an ssl problem. This is a site that moved from shared hosting on the server to a VPS...

Turned out to be an issue with the SSL certificate. I think I needed to cancel and renew it after the server change.