Kennedy5020 Posted August 10, 2013 Share Posted August 10, 2013 Hi i have the link add to cart button {if !$PS_CATALOG_MODE && ($product.allow_oosp || $product.stock_quantity > 0)} <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&id_product={$product.id_product|intval}&token={$static_token}&add")}" rel="ajax_id_product_{$product.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {/if} how to add produt attributes with this link. I have product shirt1 have 35,36,38,40.but i click the link ,cart added oly default product(35 size) . so how to add the produt with attributes Link to comment Share on other sites More sharing options...
NemoPS Posted August 10, 2013 Share Posted August 10, 2013 You need to add this &id_product_attribute={$product.id_product_attribute} To the url. Then you also need to edit ajax-cart.js I believe, to add the last parameter so it's sent to the cart controller Link to comment Share on other sites More sharing options...
vekia Posted August 10, 2013 Share Posted August 10, 2013 call to add to cart function looks like: ajaxCart.add(idProduct, null, false, this); add function has got ajax POST query: type: 'POST', headers: { "cache-control": "no-cache" }, url: baseUri + '?rand=' + new Date().getTime(), async: true, cache: false, dataType : "json", data: 'controller=cart&add=1&ajax=true&qty=' + ((quantity && quantity != null) ? quantity : '1') + '&id_product=' + idProduct + '&token=' + static_token + ( (parseInt(idCombination) && idCombination != null) ? '&ipa=' + parseInt(idCombination): ''), success: function(jsonData,textStatus,jqXHR) as you can see, there is no option to define the product attribute, only combination 2 Link to comment Share on other sites More sharing options...
NemoPS Posted August 10, 2013 Share Posted August 10, 2013 Yes, I meant combination: id_product_attribute is the combination id I'm sure it can be done as I recently did it on 1.5.4 Link to comment Share on other sites More sharing options...
lionxshop Posted August 16, 2014 Share Posted August 16, 2014 (edited) Hello please can somenone help me with this issue? I have put some attributes to products like sizes and when i want to add to cart the sizes doesnt change. Each time the shopping cart adds the first combination from a product. My website is here outlet . Can anyone look and try to add something to cart and see the problem and tell me what should i do please? hope for a response... Edited August 16, 2014 by lionxshop (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 17, 2014 Share Posted August 17, 2014 hello you've ogt the same problem with default template? can you temporarily (for test purposes) switch theme to default one? Link to comment Share on other sites More sharing options...
lionxshop Posted August 17, 2014 Share Posted August 17, 2014 (edited) well i cant change it because i have only this theme...i am looking to preferences tab - themes and i cant change to default . So i cant change to default theme Edited August 17, 2014 by lionxshop (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted August 18, 2014 Share Posted August 18, 2014 What do you mean when you say you can't change it? Any error pops out? Link to comment Share on other sites More sharing options...
vekia Posted August 18, 2014 Share Posted August 18, 2014 i see that problem is there, when i add product to cart with selected attribute, in cart i see always default combination (not the combination that i selected). i bet that problem is connected to your theme, from where you bought it? can you share a link? Link to comment Share on other sites More sharing options...
lionxshop Posted August 19, 2014 Share Posted August 19, 2014 (edited) here you can find the them http://themeforest.net/item/magma-fashion-responsive-prestashop-template/7792001 Edited August 20, 2014 by lionxshop (see edit history) Link to comment Share on other sites More sharing options...
Xtremewarehouse Posted July 29, 2015 Share Posted July 29, 2015 Hi, I have a problem since we move to a new server the URL for products is not dispalying the attributes or values on the previous server it used to show at the end of the URL html#/size-12lb/flavour-strawberry where on the new server it is html#/-/- Any help please Link to comment Share on other sites More sharing options...
NemoPS Posted July 29, 2015 Share Posted July 29, 2015 Please create a separate topic for your issue. Anyway, try clearing cache and check for any error with debug mode enabled, to start with Link to comment Share on other sites More sharing options...
Xtremewarehouse Posted July 29, 2015 Share Posted July 29, 2015 Sorry i know it sounds dumb but i am newbie to the forum don't know where to start an new topic I did the debug on for the new server and compared that to the old one as i still have access to it. Noticed that $attributesCombinations array values are empty in the new site 0 => Array (4) id_attribute => "" id_attribute_group => "" attribute => "" group => "" Thanks for your assitance Link to comment Share on other sites More sharing options...
mydataprovider Posted July 29, 2015 Share Posted July 29, 2015 hi how to update class override when upgrading module to new version in Prestashop? please help Link to comment Share on other sites More sharing options...
Recommended Posts