- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Marek
- Private: No
- Open Date: 05.01.18, 23:48
- Opened by: mehmet
- Closed by: Marek
- Closed on: 16.01.18, 13:21
- Reason: Closed
- Comment: Glad to help!
Ticket #11370 - in stock indication and available quantity not showing
Hi, I have 3 problems regarding this issue;
1: Availability:(the one above product reference on product page) is empty unless “in stock” label is defined for the particular product definition. it should be possible to use the default label in the translation for all poducts. is it a problem with the tpl?
2: “show available quantity” option on product setting page has no effect. whether it’s on of off nothing changes. only low stock and out of stock labels shown near add the cart button if those conditions met but not “in stock” label or quantity is shown
3: this one is mostly a logical issue; while trying to add more quantities then what’s available in stock results a faulty action. “Product successfully added to your shopping cart” popup appears, no actual adding to cart happens. Instead there should be a warning like the default theme has “There are not enough products in stock”. this message is shown in some rare conditions but the cart add popup is also shown too.
Can you help on these issues?
Comments
a product page to test; https://www.balunashop.com/en/wall-accessories/145-79-copy-of-pink-angel-cloud-duvar-cercevesi.html#/16-color-yellow btw; the shop in maintenance mode.
try now, it should be ok
I see the “available” indication added above reference. Did you make hard coded changes to tpl? I don’t see a translatable label here. the site is multi-lang. So it’s not the solution I’m looking for. for this purpose logical operation should be like this; show default “in stock/out of stock” labels from translations unless that particular product has its own “in stock/out of stock” definitions on catalog page. it should override default label. don’t you think so?
2. “Display available quantities on the product page” still not functioning.
3. still works incorrectly.
Yes, there is no hardcoding, just missed translation option. Try now
Phrases to translate are following:
3:
for #3, I see there is an ajax check of stock availability when quantity input changed. The delay until the result, add to cart button remains active and causes the trouble. ajax check start should disable add to cart button until result to prevent “added to cart popup” show up. if this is the default prestashop behaviour and it’s not about you, it’s up to you to take my opinion into account if you think it could be logical.
Yes 1st question is solved with small issue remaining; “Display available quantities on the product page” still not functioning, available items are always shown and when changing combination (color) it doesn’t updates the quantity.
There is no possibility to update quantity with Ajax. It’s require much to to do. That is the reason why it was removed in Alysum theme. It was a mistake to show quantity
Ok, if this is the case, at least turning on or off “Display available quantities on the product page” on shop parameters>product settings page should enable or disable the quantity shown status. do you disable or enable it directly from the template? if so, not having a non-working feature is better than having it.
btw, thanks for the prompt support.
Yes, there was missed condition. Now you can manage it from back office
So, here we reached at
- availability: works as expected unless while particular product “in stock” label overrides theme label, “Label when out of stock” in product definition can’t override. instead “Product available with different options” or “out of stock” is shown from theme default. Also before “limited items in stock” and “out of items” labels there is a <svg class=”svgic”> element causing the label to shift.
- show available quantity: works as expected
- Product successfully added to your shopping cart” popup appears although the product is not in stock because ajax stock check query doesn’t disable “add to cart” button temporarily. this also has no solution?
I added code from default prestashop theme so it work like prestashop developer did that.
as for “add to cart” issue, I don’t see it, all works fine for me https://www.dropbox.com/s/0jqpvtgm3ndnob1/baluna.mov?dl=0
Hi, you fixed the “in stock” override if product particularly has a definition and it works. But not for the “out of stock” label. that’s why I asked.
about the video, as I said, it might be the default prestashop behaviour but it’s not logical. “quantity input change” should start ajax event and disable add to cart button until it resolves. Instead “release” of input triggers ajax stock check so you have to click outside of the quantity input as you do in the video. that’s not a usual and logical move. people enter the quantity and click on add to cart directly. This results a faulty action like “product added to cart” popup show up without no actual addition to cart. it might be nothing to do with you and I’m not asking you to fix it for me, consider this as a feedback, and if you agree, you might consider fixing it in future releases.
thanks, one more question; do you have plans to implement infinite scroll?
Hi, did you have chance to look at what I mentioned in the first sentence of the previous message? thanks
don’t worry, I’ll help you as soon as possible
Give me a link to page with “Out of stock” product
https://www.balunashop.com/adminbaluna/index.php/product/form/148?_token=7B2Yk_PWJsT1BCM-_P-EYH8Pm5h1aLquO6vf_QVS-1o#tab-step3
for combination product example;
https://www.balunashop.com/en/wall-accessories/145-143-copy-of-pink-angel-cloud-duvar-cercevesi.html#/5-color-grey
Please check is it correct?
No, it doesn’t. there is not a standard solution to show labels. I will explain with screenshots of 2 examples.
1. https://www.balunashop.com/en/wall-accessories/145-145-copy-of-pink-angel-cloud-duvar-cercevesi.html#/78-color-yellow_grey 2. pls look next message
2. https://www.balunashop.com/en/wall-accessories/152-82-copy-of-pink-angel-cloud-duvar-cercevesi.html#/29-color-su_yesili
If you want, I can put original product page from Classic theme, just to compare how it works. Because I don’t know how to make all what you ask
What I’m trying to say with these images is; there is a logical mistake in this “availability” tag which you put in your theme and I’m trying to fit it into a logic. Here; http://demo.prestashop.com/en/?view=front in the original demo, the logic is completely correct. There is no “availability” tag; but, “in stock”, “low stock”, “out of stock” and “other options has stock” situations works correctly for both particular and general definitions and it’s updated upon combination change with ajax.
if you’re not willing to do any changes to make it work, here is my offer:
1- completely hide “availability” label, the one above the reference number, since it doesn’t work and doesn’t update in combination products.
2- stock availability labels shown near “add to cart” button works same as classic theme.
how does it sound to you?
1. As I wrote you before I already removed it in the demo and in the next theme version.
2. yes I know, but for some reason it doesn’t updates in another place then it is.
I checked the changes and it’s almost ok. Although “particular in stock” indication overrides “theme in stock label”, “particular out of stock” label has no effect. it’s not shown no matter what. Since I can’t check it in official presta demo because all of the items there have combinations; so, “Product available with different options” is the only thing to be able to see. Can you check it in this product example?;
frontend: https://www.balunashop.com/en/blankets/68-newborn-chalkboard-battaniye.html backend:https://www.balunashop.com/adminbaluna/index.php/product/form/68?_token=7B2Yk_PWJsT1BCM-_P-EYH8Pm5h1aLquO6vf_QVS-1o#tab-step3
Maybe I missed something, but I see a message “out of stock” there, and there is no “Product available with different options”
alright it can be confusing. here on back office, you’d see a “particular out of stock” definition like in the screenshot attached. that should be the label you’d see. it should override theme label “out of stock” when it’s defined. it works this way for “in stock” case. you can test it using back and front office links I gave before. feel free to change stock amounts to see what I mean.
Try now, it must work
No, it’s messed up now.
1. there is no “low stock” label when the quantity is low (1 left) AND there is “particular out of stock” definition.
2. although item has stock (more then 2) AND it has “particular in stock” definition, it shows “particular out of stock”
there are conditional mistakes causes above 2 errors.
Now the code is the same like in the default prestashop theme, please check it out
now everything seems ok. thanks.