Adding quantity to cart

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296670

-- url of the page with the problem -- : www.clydesdale.net/clydesdale-products/p...uct/noah-rugby-shirt
-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.11
-- PHP version -- : 5.6.37
-- Browser(s) name and version -- : Chrome

Hello,
I am having issues with quantity when adding more than whats instock to cart.

If you try fill out the quantity field with more than whats currently instock. Instead of displaying not enough instock message I get redirected to the 'Cart' page . What is causing this redirection why not just display warning message instead?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 7 months ago #296672

Hello,

I'm sorry but I don't understand your issue and I cannot reproduce your issue.
Your product do not have any stock limitation (there is no quantity stock available in the input) and you have set-up the Cart Notification plugin to display cart messages.

When I enter a value, I right got the cart notification and if I enter a really really big number, I got a warning telling me that the quantity value is too much.
For the test cases ; I'm not redirected to the cart.

I don't know what is your "instock" and what you have configured for your plugin. But the cart notification system looks to work fine in your website.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296700

Oh.. I am not sure why it working with you.
I thought I would try it again this morning and now its not redirecting to the cart.

For example if I go this product www.clydesdale.net/clydesdale-products/p...uct/noah-rugby-shirt and enter 50 quantity which is over the instock amount. It does nothing. Doesn't refresh and no message appears?

However I now remember changing the setting that redirects you to cart after selecting 'add to cart', and have now set it to stay on the same page.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
5 years 7 months ago #296708

Hello,

The best solution in your case will be to directly use the new Add to cart system instead of the "legacy" one. To do that, you'll have to :
- Publish and configure the "HikaShop Cart notification Plugin" plugin
- Set the "Add to cart legacy" option to NO via "Hikashop->System->Configuration->Advanced"

Best regards,
Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296768

Hello
I have tried that but it seems to be worse. When setting the legacy to NO, I still don't receive an error message when adding more than whats in stock. and also when the little popup appear when adding stuff to cart it display the incorrect variant selected.

I have also noticed for example if the maximum instock for a product is 10?

I can keep selecting quantity 10 to the cart numerous times and it keeps saying 'added to cart' on the 11th time it then says 'unable to add inefficient stock amount'. Its like it thinks I am only adding 1 but its actually 10 quantity I am selecting.

I have also noticed when I click 'Add to Cart' it doesn't add the product to the cart module until I have refreshed the page again?

Last edit: 5 years 7 months ago by dancingkazzaf.

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296771

Hello
I have created a staging site and the turned the legacy off so you can see what I mean. I have also changed the language file so you can see how many of each variant are instock for testing.

Here is the new link to a product page below
staging1.clydesdale.net/clydesdale-produ...uct/noah-rugby-shirt

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 7 months ago #296774

Hello,

You can set-up the "cart notify plugin" to display a popup instead.
Afterwards you have a view override for your product page and it generates a HTML error.
If you take a look at the page using Firefox ; you will see that the " </form> " tag will be red.
Because of that HTML error when you click on "add to cart", the form which is submitted include all the variants data and not just the selected one.
And that's the source of your issue.

If you fix your HTML and let the "form" include just what it should include, the submission will be correct and your problem gone.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296819

Hello,
Sorry you need to be alot more specific. I am using Firefox but I can't see any </form> tag that is red.
I have attached the the HTML which is part of the 'Add to cart' button.

Can you tell me how to fix the HTML to stop this happening please.

Attachments:
Last edit: 5 years 7 months ago by dancingkazzaf.

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 7 months ago #296822

Hello,

You can't see the red "</form>" in the "DOM" since the browser already try to fix it.
It's only in the source code display :
pasteboard.co/HzrR9Ws.png

Otherwise in the DOM you can see that the HikaShop product "form" include too much elements, when it should end after the "return_url" hidden input.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296855

Okay thanks, how do I move the </form> tag so its ends after 'return_url'.

I have looked in my edited 'Views' within Hikashop and I can't find this tag. Where am I able to edit this line?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296861

Hello to resolve the issue with the form tag. I used the show_default.php view layout from another Hikashop site we have worked on and just swapped out the changes. This seems to have resolved that problem. It seems to add the correct item to cart and the quantity seems to be working correctly.

The only problem I have now is that when you click 'add to cart' the popup appears and you click 'continue shopping' however the cart module in the corner never updates until you do a manual refresh?

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 7 months ago #296862

Hello,

1 - Good to know that you found the issue.
As I told you in a previous message :

Afterwards you have a view override for your product page and it generates a HTML error.


2 - I suppose that you also have view override for the "product / cart" so you do not have the needed JavaScript for the automatic update for that module.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 256
  • Thank you received: 2
5 years 7 months ago #296910

Hello I removed the override and it updated that Product/Cart View to the latest version and fixed all the issues.

Thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum