简体   繁体   中英

Add to cart is not working with sub store in magento

I created a multistore using this link with reference.

My default site is working fine, but in my sub store Add to cart is not working, it returns 302 error.

在此输入图像描述

The problem is that cookies are not stored in your sub store ( http://arocos.com ).

在此输入图像描述

In your default site, cookies are stored. 在此输入图像描述

Check the settings of the cookies in magento.

https://magento.stackexchange.com/questions/68070/whats-the-correct-cookie-config-for-a-magento-site-split-across-multiple-instan

Plaese refer this steps also :
What we had to do is set System > Configuration > Web > URL Options, change Add Store Code to URLs to "Yes". Then we were able to initialize the Mage::app() to the right store code and the add to cart url then correctly routes to the site that has the product.

Causes

Javascript mistake. Most likely the problem is related to the javascript mistake on your page. If you do not have any javascript errors, there's a couple of other things to look for.

Store URL. Site can be accessed through adress like: eshop.com as well as www.eshop.com. If you install your store like eshop.com, then if you'll access your store via www.eshop.com, the add to cart wont work on the homepage. So here could be the root of the problem.

Mixed Domains: Make sure that your product page is on the same domain as your Magento installation. SSL Certificate Problems: SSL errors might be caused by an incorrect environment setup, a bad server certificate, connection problems, certificate expiration etc.

Server-side problems. Your hosting provider (especially if you're on a shared hosting) may have implemented any changes that lead to functionality drop. How to Fix

Here are some tips and tricks on how to fix this and make your store sales live again.

  1. You can make a redirect from www.eshop.com to eshop.com or the other way around.
  2. Also, try this way: System->Configuration->WEB->Cookie Session. Set Cookie Lifetime to: 86400. Then flush all cache. The solution depends on which case applies to you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM