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 (see edit history)

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 (see edit history)

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 (see edit history)

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 (see edit history)

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

Edited by Marcella*M* (see edit history)

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

Available version 1.0.2

Changelog:

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

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

Hi:

the button add to cart doesn't work fine when ajax mode is disabled in shopping-cart module. I have to refresh the page for the items to be added to cart.

When ajax mode is enabled it works fine.

Great module by the way.

prestashop ver. 1.7.4.4

module ver. 1.0.2

Greetings.

Share this post


Link to post
Share on other sites
On 2/7/2018 at 10:45 AM, tresorsdargan said:

Too bad this is not available for the 1.6

i have the code for 1.6 ...
do you want?

Share this post


Link to post
Share on other sites

Excellent module. configured and working nicely.  I want to know Can I change the text when language change? Does this module support multiple languages? 

Help me if anyone know this. Thanks.

 

 

Share this post


Link to post
Share on other sites
9 minutes ago, Alvi said:

Excellent module. configured and working nicely.  I want to know Can I change the text when language change? Does this module support multiple languages? 

Help me if anyone know this. Thanks.

 

 

Hi, yes the module support multiple languages.

Share this post


Link to post
Share on other sites
In my case everything is ok, until I switch to the next subpages. At this point, the buttons for increasing and decreasing the number disappear, it looks as if the css styles are disappearing. Someone will tell you what needs to be changed? On page : https://www.gniazdka.eu/ 
it is similar on the first page with the list of products everything is ok, and on the next one there is not.

 

image.png.dcd457eebef594d9b38df9ae26b7d977.pngimage.png.0926da17ec4ad64ac69741cf5f7f7f8f.png

Share this post


Link to post
Share on other sites

hello!

I've installed this module on my prestashop 1.7.5.0, the add to cart button appears, but when I put the mouse on it, the pointer turns to a "prohibition sign".  Can you help me solve this issue, please??

Best Regards

Share this post


Link to post
Share on other sites

Somehow mine doesn't translate the "add to cart" bit - in Swedish it should be "Köp". Where can I modify this?

Share this post


Link to post
Share on other sites

I am not sure which PS you are using but I have modified text in PS 1.7.5. 

International --> Translations --> Modify translations  select type of translation "installed modules translation"
select your module "Add to cart button" select language click on modify button. and there you can change the text.
 

Share this post


Link to post
Share on other sites
2 minutes ago, Alvi said:

I am not sure which PS you are using but I have modified text in PS 1.7.5. 

International --> Translations --> Modify translations  select type of translation "installed modules translation"
select your module "Add to cart button" select language click on modify button. and there you can change the text.
 

Thanks, wierdly enough I've been checking it over and over. Now I found it!

Share this post


Link to post
Share on other sites
On 2/12/2019 at 7:57 PM, pablo19811 said:

In my case everything is ok, until I switch to the next subpages. At this point, the buttons for increasing and decreasing the number disappear, it looks as if the css styles are disappearing. Someone will tell you what needs to be changed? On page : https://www.gniazdka.eu/ 

it is similar on the first page with the list of products everything is ok, and on the next one there is not.

 

image.png.dcd457eebef594d9b38df9ae26b7d977.pngimage.png.0926da17ec4ad64ac69741cf5f7f7f8f.png

You can download the latest version of the module which has a fix for this issue.

Share this post


Link to post
Share on other sites
On 2/19/2019 at 2:30 PM, kalu said:

hello!

I've installed this module on my prestashop 1.7.5.0, the add to cart button appears, but when I put the mouse on it, the pointer turns to a "prohibition sign".  Can you help me solve this issue, please??

 

Best Regards

Hi, can you share URL with the issue so we can check?

Share this post


Link to post
Share on other sites

Hi,

I found a bug in the apache log:

Quote

[STDERR] PHP Notice: Trying to get property of non-object in /app/cache/prod/smarty/compile/fd/cf/ce/fdcfce9bf940b2b617d24c720b8a54f60d3d1137.file.addtocartbutton.tpl.php on line 33

How to fix this error?

Thanks.

Best regards

Share this post


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

Hi,

I found a bug in the apache log:

How to fix this error?

Thanks.

Best regards

Hi,

Can you please send us private message so we can have a closer look.

Share this post


Link to post
Share on other sites

Hi sum4444,

Thanks for the module. Nice that you offer it for free
I'm only running into a problem now. With a few products, a customer must fill in a required field. So the button should not be visible until you open the product
How can I change that?

Share this post


Link to post
Share on other sites
31 minutes ago, Hans Wolf said:

Hi sum4444,

Thanks for the module. Nice that you offer it for free
I'm only running into a problem now. With a few products, a customer must fill in a required field. So the button should not be visible until you open the product
How can I change that?

Hi,

Can you please share the URL where we can see the issue?

Share this post


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

Hi,

Can you please share the URL where we can see the issue?

That is not possible. I am still in a test environment
Can I deliver something else? Photos?. Or just provide your IP address for the Maintenance mode?

https://speelgoedenverzamel.shop/gb/
 

 

Share this post


Link to post
Share on other sites
4 hours ago, Hans Wolf said:

Hi sum4444,

I made a movie

If I have added a Customization (see appendix Screenshot_1.jpg) to a product (see  appendix 2019-03-01 08-36-36.mp4)

Without Customization it just works. (See appendix 2019-03-01 08-45-02.mp4)

Screenshot_1.jpg

Thank you for detailed information. We updated the module to fix the issue. Please download the latest version and give it a try.

Share this post


Link to post
Share on other sites

Hi sum4444,,

Thank you very much for resolving. It's working. I am very happy with you. And that's completely free

Share this post


Link to post
Share on other sites
59 minutes ago, Hans Wolf said:

Hi sum4444,,

I have a Dutch translation file for you that you might also add (see attachment)nl.phpnl.php

Thank you, we'll add the translation in our next update.

Share this post


Link to post
Share on other sites
On 3/2/2019 at 8:20 PM, Hans Wolf said:

Hi sum4444,,

It is not quite right yet
With this product you can order a maximum of 3
See example movie

We'll try to add a fix for this asap.

Share this post


Link to post
Share on other sites

Ciao, è possibile cambiare la lingua? adesso è in inglese, a me servirebbe il pulsante in italiano. Grazie

Share this post


Link to post
Share on other sites
25 minutes ago, Dream N. said:

Ciao, è possibile cambiare la lingua? adesso è in inglese, a me servirebbe il pulsante in italiano. Grazie

Yes, you can translate all texts from backoffice.

Share this post


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

Sì, puoi tradurre tutti i testi dal backoffice.

puoi gentilmente suggerirmi i passaggi? grazie

Share this post


Link to post
Share on other sites

there is small bug with qunatity - you can add more than there is in stock and then  no product image shows in cart preview and when you go to cart you get message that you can not add such quantity..

Share this post


Link to post
Share on other sites

grazieeeee

adesso ho un altra domanda: come faccio a dividere i prodotti? con l'aggiunta del pulsante sono adesso attaccati.

Immagine.png.065a7831a010fd8597dd0ce21ab44c4d.png

Share this post


Link to post
Share on other sites
36 minutes ago, dolec said:

there is small bug with qunatity - you can add more than there is in stock and then  no product image shows in cart preview and when you go to cart you get message that you can not add such quantity..

Hello dolec,

sum4444  Is already working on it to solve it.

 

Share this post


Link to post
Share on other sites
23 minutes ago, Dream N. said:

grazieeeee

adesso ho un altra domanda: come faccio a dividere i prodotti? con l'aggiunta del pulsante sono adesso attaccati.

Immagine.png.065a7831a010fd8597dd0ce21ab44c4d.png

I do not understand what you mean. Can you explain it differently?

Share this post


Link to post
Share on other sites

All, available version 1.0.5, which has a fix when you try to add more qty than there is in stock.

Share this post


Link to post
Share on other sites

Available version 1.0.6

Changelog:

* Disable Add to cart when maximum qty is on cart.

Share this post


Link to post
Share on other sites
2 hours ago, sum4444 said:

Available version 1.0.6

Changelog:

* Disable Add to cart when maximum qty is on cart.

Hello sum4444,

Is this also suitable for a multistore or has it not yet been tested?

Share this post


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

Hello sum4444,

Is this also suitable for a multistore or has it not yet been tested?

It works fine with mutistore configuration.

Let me know if you notice any issues.

Share this post


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

It works fine with mutistore configuration.

Let me know if you notice any issues.

Should this module be installed on Root "all shops" or per shop?

Screenshot_1.jpg

Share this post


Link to post
Share on other sites
3 hours ago, Hans Wolf said:

Should this module be installed on Root "all shops" or per shop?

Screenshot_1.jpg

It doesn't matter, you can install it on any shop and then enable / disable for the other shop from the module configuration page.

Share this post


Link to post
Share on other sites
On 6/10/2019 at 2:58 PM, sum4444 said:

It doesn't matter, you can install it on any shop and then enable / disable for the other shop from the module configuration page.

 

Hello Sum4444

Thank you very much for the update
Unfortunately I get an error message
When installing 1.0.6 I get this error message (see photo left above)
Not with 1.0.5

Screenshot_1.jpg

Screenshot_2.jpg

Share this post


Link to post
Share on other sites
45 minutes ago, Hans Wolf said:

 

Hello Sum4444

Thank you very much for the update
Unfortunately I get an error message
When installing 1.0.6 I get this error message (see photo left above)
Not with 1.0.5

Screenshot_1.jpg

Screenshot_2.jpg

Can you please download it again and try?

Share this post


Link to post
Share on other sites