0

A site running EE 3.5.7 and Carthrob 3.2

The site was moved from another domain and now I am not able to add items to the cart.

The item is sent to the product_detail page using:

<a href="{entry_id_path='/new/image'}">

On the product page I have the following code:

...
{exp:cartthrob:add_to_cart_form
        class='form-horizontal'
        entry_id="{entry_id}"
        no_tax="{no_tax}"
        no_shipping = "{no_shipping}"
        return="{template_group}/view_cart"
    }

        
            {exp:cartthrob:item_options entry_id="{entry_id}"}
              {if dynamic}
              <div class="control-group">
                    <label class="control-label" for="{option_field}">{option_label}</label>
                    <div class="controls">
                    {input}
                    </div>
                </div>
                {if:else}
                    {if options_exist}
                  <div class="control-group">

                        <label class="control-label" for="{option_field}">{option_label}</label>
                        <div class="controls">
                        {select class="input-medium"}
                            <option {selected} value="{option_value}">
                                {option_name}{if option_price_numeric != 0} +{option_price}{/if}
                            </option>
                        {/select}
                        </div>
                    </div>
                    {/if}
                {/if}
            {/exp:cartthrob:item_options}

        <div class="control-group">
        {if "{inventory}" == "0" }
            <p><strong>This item is out of stock</strong></p>
        {if:else}
            <label for="product_quantity" class="control-label">Quantity</label>
            <div class="controls">
                <input type="text" id="product_quantity" class="input-medium"  placeholder='1' name="quantity" size="8"  />
            </div>
        {/if}
        </div>

        <div class="control-group">
            <div class="form-actions">
                <button type="submit" class="btn btn-primary">Add to Cart</button>
            </div>
        </div>
    {/exp:cartthrob:add_to_cart_form}
...

When I click Add to Cart it goes to view_cart but the I get the following message:

Shopping Cart You have no items in your cart. Continue shopping.

I have reinstalled the default templates but to no avail.

Any help in getting this resolved would be appreciated.

1

It turned out to be a cookie setting issue. I found it [here].1

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.