Jump to content
sum4444

[Free Module] Display Add To Cart Button In Product List Pages

Recommended Posts

I just want to say this is simplistic and wonderful.  Thank you!

If anyone is having an issue with the front page not rendering the Add to Cart button, in BO, go to Advance Parameters / Performance and Clear your Cache.

Share this post


Link to post
Share on other sites
On 2/9/2018 at 12:59 AM, De Verzamelman said:

Is it possible to center the button?

By default the button should be centered if you disabled quantity field

Share this post


Link to post
Share on other sites
5 hours ago, mitza2005 said:

Hello ,

I just installed the module on http://magazin.masinicopiatchei.ro and when i press the "add to cart" button it dosen't do anything....

 

what am i doing wrong?

 

Best Regards

Hi, we have checked and it seems works just fine, is there any specific way to recreate the issue?

Share this post


Link to post
Share on other sites

Hi,

unfortunately it's not working for me, the button is not being displayed. I am on Prestashop 1.7.2.5, and I have cleared the cache after installing the module. Anyone have an idea what I could try to get it to work?

Thanks!

Share this post


Link to post
Share on other sites
1 hour ago, Rehlein said:

Hi,

unfortunately it's not working for me, the button is not being displayed. I am on Prestashop 1.7.2.5, and I have cleared the cache after installing the module. Anyone have an idea what I could try to get it to work?

Thanks!

Hi,

Please send us private message with the details of your PrestaShop installation so we can check the issue.

Share this post


Link to post
Share on other sites

Hi,

me too it not work. I have PS 1.7.2.4

When i push the button, not add nothing to cart. I had clear PS and Chrome chace, after installation.

Some help? Thanks

Share this post


Link to post
Share on other sites
Just now, Daniele0884 said:

Hi,

me too it not work. I have PS 1.7.2.4

When i push the button, not add nothing to cart. I had clear PS and Chrome chace, after installation.

Some help? Thanks

Hi,

 

Can you share your website URL please?

Share this post


Link to post
Share on other sites
17 minutes ago, sum4444 said:

Hi,

 

Can you share your website URL please?

The website is  http://miofantasy.it/2-home

I have find the problem:

If you buy like visitor (without login) it work. If you login and buy like customers, it not work.

If you want try, you can login like: user= GUEST@GUEST.COM  passw= GUEST

I wait help for solution, Thanks

Share this post


Link to post
Share on other sites

Hi,

It seems there is no Add to cart button in product page when customers are not logged in.

 

We'll add this functionality in future updates.

 

Thanks.

Share this post


Link to post
Share on other sites

Hi,

 

my win10 + Opera browser does not work.
cart button appears but does not do anything.
win10 + microsof Edge browser is perfect working, android + Opera is perfect working.
Presta version: PS 1.7.3.1

What could be the problem?

Share this post


Link to post
Share on other sites
On 19.04.2018 at 9:51 PM, Rojna said:

works great when ur NOT logged in, once the customer logs in it dont work ...

Same problem to me...logged not working

Edited by ADM777

Share this post


Link to post
Share on other sites

Available version 1.0.1

Changelog:

* Fixed Add to cart issue when customer is logged in.

Share this post


Link to post
Share on other sites
It's me again :)  

adding to the cart in the ps_categoryproducts module does not work  

Does someone have the same problem?
Edited by m4rlb0r0

Share this post


Link to post
Share on other sites
14 hours ago, m4rlb0r0 said:

It's me again :)  

adding to the cart in the ps_categoryproducts module does not work  

Does someone have the same problem?

Can you please share the URL so we can check.

Share this post


Link to post
Share on other sites

Hi!

Two questions:

1). The icon in the button has not been loaded because properties for 'material-icons' class wasn't loaded. Any suggestions? Cache was cleared...

2). In my template the button is displayed on hover between product's title and "compare" button. How it could be brought to bottom?

Share this post


Link to post
Share on other sites

On prestashop 1.7.4.2

When i click on "add to cart" button, the popup confirmation open and if i click on "continue shopping" an error appear abode add to card's button.

Sans titre-1.jpg

Share this post


Link to post
Share on other sites
Dne 7. 2. 2018 v 11:45 řekl tresorsdargan:


 

 

Prestashop  verze 1.6

Stačí se přihlásit k FTP serveru a přejděte do modulu adresáře / homefeatured / a otevřete soubor homefeatured.css. V tom jsou linky

Kód:
# featured-products_block_center li .ajax_add_to_cart_button {display: none;}
# featured-products_block_center li span.exclusive {display: none;}
 
změnit
 
Kód:
# featured-products_block_center li .ajax_add_to_cart_button {display: blok;}
# featured-products_block_center li span.exclusive {display: blok;}
 
Následně na hlavní stránce Vybrané produkty se na tlačítko Produkty zobrazují tlačítko Přidat do košíku.
Edited by pcr

Share this post


Link to post
Share on other sites

Hi @sum4444,

My apologies as this is going to be a little off-topic here but I am puzzled and couldn't find anything elsewhere.

I'm trying to make Add to Cart buttons of my own for 2 combinations of a single product on the same page (eg, black shirt/white shirt). I tried to do this with the default code of the theme:

<form action="{$urls.pages.cart}" method="post" id="add-to-cart-or-refresh">
                  <input type="hidden" name="token" value="{$static_token}">
                  <input type="hidden" name="id_product" value="{$product.id}" id="product_page_product_id">
                  <input type="hidden" name="id_customization" value="{$product.id_customization}" id="product_customization_id">

<div class="product-quantity clearfix">
        <div class="qty">
          <input
            type="text"
            name="qty"
            id="quantity_wanted"
            value="{$product.quantity_wanted}"
            class="input-group"
            min="{$product.minimal_quantity}"
            aria-label="{l s='Quantity' d='Shop.Theme.Actions'}"
          >
        </div>

        <div class="add">
          <button
            class="btn btn-primary add-to-cart"
            data-button-action="add-to-cart"
            type="submit"
            {if !$product.add_to_cart_url}
              disabled
            {/if}
          >
            <i class="material-icons shopping-cart">&#xE547;</i>
            {l s='Add to cart' d='Shop.Theme.Actions'}
          </button>

</form>

but it only adds the currently selected combination and as the id_product is same for both combinations, I'm looking for a way to specify which one to add.

Do you have any idea on how to achieve this? Any sort of help would be appreciated.

Again, apologies for off the topic reply. 

 

Thanks!

 

Edit:

Solved the issue, just has to include this line inside the form

<input type="hidden" name="id_product_attribute" value="{$currentComboId}" id="id_product_attribute">

$currentComboId has the "id_product_attribute" attribute of the product's combination but you'll have to fetch that manually.

Edited by User17745
Solved

Share this post


Link to post
Share on other sites
On 2/5/2018 at 11:01 AM, sum4444 dice:

Available version 1.0.1

Changelog:

* Fixed Add to cart issue when customer is logged in.

Hi,

this error isn't fixed on Prestashop version 1.7.2.4

In addition:

  • when i click on "Continue Shopping" (not logged) --> in the url the last step is replaced with the word "undefined";
  • when i set a filter (not logged) --> the cart pop-up is broken and the cart is empty (see attachment).

How could I solve?

cart-when-set-filter.jpg

Share this post


Link to post
Share on other sites
On 9/25/2018 at 8:29 PM, Marcella*M* said:

Hi,

this error isn't fixed on Prestashop version 1.7.2.4

In addition:

  • when i click on "Continue Shopping" (not logged) --> in the url the last step is replaced with the word "undefined";
  • when i set a filter (not logged) --> the cart pop-up is broken and the cart is empty (see attachment).

How could I solve?

cart-when-set-filter.jpg

Hi,

Can you please share problem url so we can check it?

Share this post


Link to post
Share on other sites

Hi

 

Thanks for this module, I've been looking for something like this for a long time !

Everything's working well for me on PS 1.7.4.2, except one thing. I'd like to disable add to cart button when a product is no longer available on my store.

Currently, I can add to cart a product out of stock and it causes an error when I go the shopping cart page.

I tryed to manage this by modifying "addtocartbutton.tpl" like this:

 

{if $product.quantity > 0} /*THERE*/
<form action="{$urls.pages.cart}" method="post" class="hiaddtocart">
    <input type="hidden" name="token" value="{$token}">
    <input type="hidden" name="id_product" value="{$id_poduct}" class="product_page_product_id">
    <input type="hidden" name="id_customization" value="0" class="product_customization_id">
    {if $quantity_block}
        <div class="product-quantity">
          <input
            type="text"
            name="qty"
            value="{$minimal_qty}"
            class="input-group hi-quantity"
            min="{$minimal_qty}"
            aria-label="{l s='Quantity' mod='hiaddtocartbutton'}"
          >
        </div>
    {/if}
    <button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit">
        <i class="material-icons shopping-cart"></i> {l s='Add To Cart' mod='hiaddtocartbutton'}
    </button>

</form>
{else}

<form action="{$urls.pages.cart}" method="post" class="hiaddtocart">
    <input type="hidden" name="token" value="{$token}">
    <input type="hidden" name="id_product" value="{$id_poduct}" class="product_page_product_id">
    <input type="hidden" name="id_customization" value="0" class="product_customization_id">
    {if $quantity_block}
        <div class="product-quantity">
          <input
            type="text"
            name="qty"
            value="{$minimal_qty}"
            class="input-group hi-quantity"
            min="{$minimal_qty}"
            aria-label="{l s='Quantity' mod='hiaddtocartbutton'}"
          >
        </div>
    {/if}
    <button class="btn btn-primary add-to-cart" data-button-action="add-to-cart" type="submit" disabled>
        <i class="material-icons shopping-cart"></i> {l s='Add To Cart' mod='hiaddtocartbutton'}
    </button>

</form>
{/if}

But now, every add to cart buttons are disabled, even if product is in stock.

Do you have any idea about how I can fix that ?

Thank you !

 

Share this post


Link to post
Share on other sites
On 07/11/2018 at 6:39 PM, Marcella*M* said:

Hi, i've bought a module to Add-to-cart with quantity.

 

Bye

Could you please tell me which one ? I'm waiting for an answer since a week...

Share this post


Link to post
Share on other sites
14 ore fa, Canti dice:

Could you please tell me which one ? I'm waiting for an answer since a week...

The module is called: "Show add to cart button product list / category page Module"

and it'is here: https://addons.prestashop.com/en/registration-ordering-process/30299-show-add-to-cart-button-product-list-category-page.html

Bye

Share this post


Link to post
Share on other sites
On 11/11/2018 at 5:47 AM, sum4444 said:

Available version 1.0.2

Changelog:

* Disable Add to cart button when product is out of stock.

Thank you so much, everything's fine now !

Share this post


Link to post
Share on other sites

The module is great and I truly appreciate your works. I would like to customize the AddtoCart symbol and text so please help advise which file that I can make the changes and how? Many thanks in advance for your time.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More