markstone Posted January 21, 2011 Share Posted January 21, 2011 Hello all, I am trying to add an "add to cart" button in this module specifically - http://www.prestashop.com/forums/viewthread/5801/P75/third_party_modules/solved_countdown_timer_for_special_prices_current_v0_dot_8_dot_1I have tried copying pasting the "add to cart" codes from various *tpl's - product, product-list, homefeatured.tpl, etc....but none of them worked I was curious if there's a way to apply an "add to cart" button to the countdown timer module? I would only run one item in the special countdown module at a time (aka. only have one product on sale at all time) ...Please help! And thank you all! Link to comment Share on other sites More sharing options...
markstone Posted January 21, 2011 Author Share Posted January 21, 2011 Nevermind figured it out Now have to figure out how to list product options as well... Link to comment Share on other sites More sharing options...
curtdonohue Posted January 22, 2011 Share Posted January 22, 2011 markstone,How did you fix your issue?Curt Link to comment Share on other sites More sharing options...
markstone Posted February 22, 2011 Author Share Posted February 22, 2011 Hello Curt, very sorry for the late reply!I have contacted a developer and figured out a method - basically just add the following into anywhere you want the "add to cart" button to show up: <form id="buy_block12" action="{$base_dir}cart.php" method="post"> <!-- hidden datas --> <input type="hidden" name="token" value="{$static_token}" /> <input type="hidden" id="product_page_product_id" value="1" name="id_product"> <input type="hidden" value="1" name="add"> <input type="hidden" name="id_product_attribute" id="idCombination" value="" /> {l s='Quantity:'} <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" /> <input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p> </form> It doesn't have the animation function that shows the product being added into the blockcart - instead it takes you straight to the order.php page - which is actually what I wanted for my site. I am not sure how to make the animation of the typical "add cart" function work like it would when you "add to cart" in a product page...if anybody else know how please feel free to contribute though! Link to comment Share on other sites More sharing options...
Nuvish Posted May 30, 2011 Share Posted May 30, 2011 Who has the solution for this?I need to have an add to cart button in block new products.Iv added taken these lines from the products page and pasted them in the module tpl.. {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0) && $product.customizable != 2} getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'} {else} {l s='Add to cart'} {/if} {/if} The problem is that,this does not work the proper way.The block cart gets updated but only when i reload the page..The js effect is not triggered as well..Im sure that im missing something here..Help plz Link to comment Share on other sites More sharing options...
Kelinci Posted June 7, 2011 Share Posted June 7, 2011 Who has the solution for this?I need to have an add to cart button in block new products.Iv added taken these lines from the products page and pasted them in the module tpl..{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0) && $product.customizable != 2} getPageLink('cart.php')}?add&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}" title="{l s='Add to cart'}">{l s='Add to cart'} {else} {l s='Add to cart'} {/if} {/if} The problem is that,this does not work the proper way.The block cart gets updated but only when i reload the page..The js effect is not triggered as well..Im sure that im missing something here..Help plz try thisclass="button ajax_add_to_cart_button product_img_link exclusive" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now