Characteristics not retained in checkout

  • Posts: 81
  • Thank you received: 2
5 years 7 months ago #297454

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.12
-- PHP version -- : 7.1.21

Hi again

A weird problem, which I have no idea what is causing it.

On this site (selling shoes) the customer can choose the shoe size in a dropdown. This works fine on the product page, but when added to the basket it always shows the same size.

Can you tell me where the problem might be?

Best regards
David

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
5 years 7 months ago #297456

Hello,

That kind of problem is mostly due to an override of your product page.
If there is some HTML errors in the page (break the DOM) ; instead of submitting only the selected variant, it will submit all variants data.
In such case, we first recommend to (backup) remove the view overrides ; or you can change temporally your template to the default Joomla one (so a template without overrides).
If the idea was the good one then it will need to fix the HTML errors in the view override so the "<form>" in the product page won't be broken anymore.

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: 81
  • Thank you received: 2
5 years 7 months ago #297476

Hi Jerome

Thanks for the input. We have developed an app for the shop and have overridden a couple of the views to position the scripts. Specifically

Frontend>Product>show_block_characteristic and
Frontend>Product>show_block_tags

How can I add a new view in the product detail page so that we can add the scripts in such a way that it doesn't interfere with anything else?

If you look at the site Example Page you'll see the "Footfact" stuff. Ideally we would like to position that stuff there, but we have some flexibility.

Thanks in advance for your help.
Best regards
David

Last edit: 5 years 7 months ago by iamalive. Reason: Changed URL to Test site

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

  • Posts: 81509
  • Thank you received: 13064
  • MODERATOR
5 years 7 months ago #297492

Hi,

Customizing the product page is not a problem. The problem is that you've made some mistakes in the HTML.
If you check the HTML of the page with the browser's inspector, you can see that the hidden data of the variants of the product are inside the form tag of the page:
monosnap.com/file/U0DlkVTRyK1iYDHjFyd9JWP9VJYant
Normally, that data is outside the form. Because of that, when you click on the "add to cart" button, it submits the data of the selected variant, and then the data of each variant. This leads to the server only seeing the data of the last variant. And thus, regardless of what you select it's always that variant that gets added.
This indicates that you're missing some closing div tags near the end of the view files that you've customized or something like that.
If you check the HTML with the default template of Joomla, you'll see that the hidden data of the variants is outside of the form tag by default, so you just need to make sure that it's still the case with your customization.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum