I’ve added a configurable product as shown in the screencast to my store.
In the frontend, I get the dropdown box with my three configured sizes. But if I select any value (except the first one) and click on “add to cart” I get redirected to the product detail page (where I clicked on “add to cart") with a whole bunch of errors: “Trying to get property of non-object”. This comes from the redirect which forgets to append the category id.
But the problem causing the product (which exists with a qty of 1000) not to be added to the cart seems to be the JSON in file design\frontend\default\default\template\catalog\product\view\super\config.phtml. There are the product ids fetched out of app\code\core\Mage\Catalaog\Block\Product\View\Super\Config.php with method “getJsonConfig()”. This generates the JS var string in config.phtml which should hold for each configurable size a product id (id from the sql table). But instead for each of these products it only has the first entry’s id. Here’s what the JS var string looks like:
var spConfig = new Product.Config({"attributes":{"542":{"id":"542","code":"figure_height","label":"H\u00f6he","options":[{"id":"111","label":"30","price":"0.00","products":[149]},{"id":"112","label":"40","price":"0.00","products":[]},{"id":"114","label":"75","price":"0.00","products":[]}]}},"template":"#{price} \u20ac","basePrice":"150.00","productId":"148","chooseText":"Choose option..."});
As you can see, the “products” values are empty except for the first one (out of three).
I checked the Magento demo store, and there it seems to work fine. I’ve tried this out locally with no modifications and it doesn’t work.
Any idea how to fix this?
seems to work now with the advice from developer to “enable” this product in each store we viewed in… many errors on page if we didn’t enable product (one of qty to low and one exception of categories not found for this product).
seems to work now with the advice from developer to “enable” this product in each store we viewed in… many errors on page if we didn’t enable product (one of qty to low and one exception of categories not found for this product).
_pete®
Could you post here the text of error message you get ?