Support will be provided with delays until 6 June. We are sorry for the inconvenience.
We offer professional Design/Code Customisation and Website Optimisation Service Request Customisation
  • Priority: High
  • Status: Closed
  • Closed by: Marek (marek)
  • Closed on: 13.07.18, 20:27
  • Reason: No answer from a customer

Ticket #11657 - Display error/message when try to add more piece than stock

Hello, i have a problem with add to cart button.
For example this product: Every combination have only one piece.
If i add to cart first piece is ok, but when i try to click second time, nothing happen. I need at second click (over stock availability) display message that notify customer that there is no other piece of that product in stock.


Schermata 2018-02-13 alle 10.... (1.05 MiB)

This ticket does not depend on any other tickets.

Marek (marek) 19 Feb 2018, 13:41

Hi, Diego.
Sorry for the delay. I spent much time these days, but still don't have any result

Diego (aircrescio) 19 Feb 2018, 14:13

Ok, I wait your confirm for fix, thanks for your support, this fix is very important for user experience.

Marek (marek) 19 Feb 2018, 14:14

Yes, I understand

Marek (marek) 22 Feb 2018, 22:27

Hi, Diego.
The issue is with the code:

But I have checked that in the original theme and it should not be there, so I suppose it's one of your customisation. Try to fins it and remove.

Diego (aircrescio) 22 Feb 2018, 22:34

Please help me because i don’t make that changes. Thanks

Marek (marek) 22 Feb 2018, 23:07
Diego (aircrescio) 06 Mar 2018, 12:50

Where i can customize css and layout of popup? I'd like have the same layout of cart behavior as you can see in attachment.

Schermata_2018-03-06_alle_12.... (919.3 KiB)
Marek (marek) 06 Mar 2018, 13:08

That is a native prestashop plugin, but you can override it with your styles in the theme .css file, for example alysum.css

Diego (aircrescio) 06 Mar 2018, 15:10

ok, but where i can find style of that popup that you use in your theme as you can see in last attachment? thanks

Marek (marek) 07 Mar 2018, 15:42

You have to use Developer tools to find necessary styles. Here is useful video about that

Diego (aircrescio) 09 Mar 2018, 17:51

You have no idea where you have styled cart popup for copy style?

Diego (aircrescio) 09 Mar 2018, 18:19

I try to use developer tool for analyze your popup but i can't... there isn't Inspector the popup of cart i can find tool. Can you help me to replicate same style of my last attachment?

Alex Support (Admin) 09 Mar 2018, 22:02

Hi. You want to change the default message look to popup message
Am I right?

Diego (aircrescio) 06 Apr 2018, 16:41

There is a problem with popup:
Check this link: This product is out of stock but available for order. I need display popup only if product is out of stock and is not possible order it out of stock.
Can you fix it?
And I need translate it in Italian language. Where can I do it?

Diego (aircrescio) 16 Apr 2018, 17:18

Any news? now is not usable...user can't understand that can make an order.

Diego (aircrescio) 17 Apr 2018, 11:39

And how can i translate it? Where i can find that text?

Diego (aircrescio) 24 Apr 2018, 11:59

I have no answer since 20 days.
I can't use long shipping for my website if you can't help me to fix this issue.
There is a problem with popup:
Check this link: This product is out of stock but available for order. I need display popup only if product is out of stock and is not possible order it out of stock.
Prestashop give to me possibility to order product also if it is not at stock.
Your popup need check if is it possibile to order out of stock and in this case not display popup error, if product is out of stock and is not possibile (from product settings) order it out of stock need to display popup error.
Can you fix it?
And I need translate it in Italian language. Where can I do it?

Schermata 2018-04-24 alle 11.... (473 KiB)
Marek (marek) 24 Apr 2018, 14:58

Hi, Diego.
The ticket is not assigned to Alex, that's why he didn't see your messages. I'll send him a link and assign the ticket to him

Marek (marek) 24 Apr 2018, 15:00

All problems I'll fix myself

Marek (marek) 24 Apr 2018, 15:05

As I can see there are two items available in stock

Diego (aircrescio) 24 Apr 2018, 16:01

ok, but try to set quantity to 0...
and turn on available for buy also with out of stock.

Diego (aircrescio) 24 Apr 2018, 16:07

This is URL: In attachment you can find video and 2 screenshot for different status for order!
Is not fixed!
Check name of attachments.

0 and available for order out... (1.29 MiB)
0 and not available for stock... (0.96 MiB)
Marek (marek) 25 Apr 2018, 15:51
Diego (aircrescio) 26 Apr 2018, 10:36

Yes, of course works right!
That product is available when you try to add more than 1 piece in a cart.
If you go in backend of prestashop, change quantity of the product to 0 and set "Accept order out of stock" you can find the problem!!!
If you watch my attachments, you see "6-8 settimane" and not "1 pezzo disponibile" as your video!
The problem is when product is out of stock, but i want permit to my customer to order that (Spedizione in 6-8 settimane).
If you read name of my attachment you can understand condition for stock and order availability.
Please say to me if is clear the problem or can we plan a Skype call for explain it?
This is important to fix for my catalogue.

Schermata 2018-04-24 alle 11.... (473 KiB)
Marek (marek) 26 Apr 2018, 11:40

Now I see what you debcriіed, but I don't know how it should work. What should be when I click to increase product amount?

Diego (aircrescio) 26 Apr 2018, 14:31

there are 3 condition:
1: in stock: the same behavior as now... check availability and display popup if try to add in a cart too many pieces of that product.
2: out of stock and not available for order out of stock: display red dot as now (display SOLD OUT sentence in red and display SOLD OUT label in homepage carousel, category page and brand page).
3: out of stock and available for order out of stock: display yellow dot (Spedizione in 6-8 settimane) and user can add free number of pieces in a cart (we order from our reseller that product and user is free to choose how many pieces order). Never display popup for this condition and also in homepage carousel,category page and brand page need to not display SOLD OUT label.

Prestashop manage this 3 condition in the product page in backend and you can see it in product.tpl file.
You can easily understand behavior because in that file you can find 3 condition as 3 images of dot (red, yellow and green).

Marek (marek) 27 Apr 2018, 19:52

So, here is what I have done.
1. Out of stock label is removed

2. there is no more alert popup on product page

Diego (aircrescio) 27 Apr 2018, 21:22

Sorry but out of stock label need to be displayed if the product is out of stock and is not available for order out of stock (condition number 2 of my previous ticket). For other condition, (1 and 3 of previous ticket) need display SOLD OUT label if product is not in stock!
Popup need to be used in the number 1 condition when user can add to cart more piece than we have in a stock.

Diego (aircrescio) 08 May 2018, 10:23

Hello, i need help to fix this....i can't activate many products for sell it online for this problem.
Please help me...

Marek (marek) 08 May 2018, 13:42

I'm going crazy with your Out of stock label. I already make it work like you asked me before.
Open the file /themes/alysum/product-list.tpl
find the code:

{if $product.quantity == 0 && $product.out_of_stock != 1}
<span class="new">{l s='Out of stock'}</span>
<span class="new">{l s='Sold out'}</span>

and change it as you like

Diego (aircrescio) 08 May 2018, 13:47

The problem is not that miss the condition $product.quantity == 0 && $product.out_of_stock == 1

In that condition need hide sold out label!

And the problem is the same in product.tpl file! Read my previous ticket... there are 3 condition...
Ticket of 26 April at 14.31.

This is important!

Diego (aircrescio) 08 May 2018, 13:55

And there is another big problem:
In the new products page all products display sold out label!

CB4014D6-8C9F-4BA4-9323-575F8... (140.5 KiB)
Diego (aircrescio) 08 May 2018, 14:00

EVERY PRODUCTS now display sold out! Please fix it...

Marek (marek) 08 May 2018, 14:05

I wrote you where is that code, why you can't do that yourself?

Diego (aircrescio) 08 May 2018, 14:24

I’m not able to do that, i’m not confident with code. Continue to have problem for popup in product page. And now homepage not load!!!

Marek (marek) 08 May 2018, 14:31

All works fine for me, I don't see any problem

Diego (aircrescio) 05 Jun 2018, 09:59

All seems work fine but now, when click "add to a cart button" not appear popup box for "go to checkout" or "continue to shopping".
User need to be advertise through that popup! every products now not display popup! is the same problem of lookbook. You say that is a problem of multiple products, but now also single products not display it!

Marek (marek) 05 Jun 2018, 14:23

Alex will help you with that

Alex Support (Admin) 05 Jun 2018, 17:38

Hi Diego.
Someone did changes for you in the /themes/alysum/js/modules/blockcart/ajax-cart.js in last 1 month?
Some changes in Add to cart?

Diego (aircrescio) 05 Jun 2018, 17:56

No. i never change it. i don't know ajax code! I think your developer change it for fix message as this ticket request!

Alex Support (Admin) 05 Jun 2018, 18:01

Please check now. It should work ok. Clear please browser cache

Diego (aircrescio) 13 Jun 2018, 11:26

continue to have a problem with lookbook module and "add to a cart button.

Schermata 2018-06-13 alle 11.... (1.07 MiB)
Alex Support (Admin) 13 Jun 2018, 12:57

Please don't duplicate the messages in different tickets. I've answered in another ticket

Diego (aircrescio) 18 Jun 2018, 12:08

I don't duplicate it, but i need my ticket i find only this ticket!