URGENT: Prices are not displayed — issue with Price Calculations

  • Posts: 435
  • Thank you received: 19
  • Hikashop Business
1 week 17 hours ago #370848

Hi Nicolas,

After updating to HikaShop 6.4.0, I’m facing a critical issue: on some product pages the price is not displayed on screen when the price depends on HikaShop – Price Calculations (price computed from custom fields such as width/height/quantity/shape).

What happens

The calculation is triggered (an XHR request returns HTTP 200), but the price never renders.

The browser console shows:

Uncaught TypeError: Cannot read properties of null (reading 'price')

Triggered inside the xhr.onreadystatechange callback (hikashop.js).

Technical evidence (Network/XHR)

In Network → XHR there is a request named calculate returning:

Response: No product id

And in Payload / Form data, only these parameters are sent:

{"cart_type":"cart","add":"1","ctrl":"product","task":"updatecart","return_url":"aHR0cHM6Ly93d3cuaGVybWFub3NnYWxpYW5vLmVzL2NvbXByYXIvZXRpcXVldGFzLXBlcnNvbmFsaXphZGFz"}

As you can see, product_id is not being sent.

DOM evidence

In Elements, I can see:

<span id="hikashop_product_id_main" class="hikashop_product_id_main"></span>

This span is empty (no ID inside), so the AJAX/calculation flow cannot retrieve the product_id and the request ends with “No product id”. Then the JS tries to read .price and crashes.

Important notes

This does not affect all products: it happens only on products where the price is calculated using Price Calculations with custom fields.

Products with a “normal” price (no calculation) are not affected.

Example URL

www.hermanosgaliano.es/comprar/etiquetas-personalizadas

Request

Could you please confirm if this is a regression in 6.4.0 and provide a patch?
It looks like the issue is that product_id is not injected into the DOM (or is not being read properly) when building the calculate/updatecart request.

Thank you in advance — this is urgent because it directly impacts conversions.

Best regards,
José Ángel
Hermanos Galiano

The following user(s) said Thank You: oxido

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

  • Posts: 85323
  • Thank you received: 13937
  • MODERATOR
1 week 16 hours ago #370852

Hi,

This is related to the form restructuring on the product page in 6.4.0. The product_id hidden input was moved outside the <form> element and now uses an HTML form attribute to stay associated with the form.
The Price Calculations plugin serializes the form data using a method that only collected inputs physically inside the form element, so product_id was missing from the AJAX request.

We've fixed this. Please download the updated 6.4.0 package from your member area and reinstall. Make sure to clear your browser cache (Ctrl+Shift+R) to force the JavaScript file to reload.

The following user(s) said Thank You: Reincidente, oxido

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

  • Posts: 435
  • Thank you received: 19
  • Hikashop Business
1 week 15 hours ago #370854

Thanks Nicolas.
It works fine.
Best regards.

The following user(s) said Thank You: oxido

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

  • Posts: 435
  • Thank you received: 19
  • Hikashop Business
5 days 19 hours ago #370888

Hi Nicolas.
This had been solved, but in some of the new versions something has changed and now the prices are not shown in the articles that refer to the plugin's calculations Price Calculations

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

  • Posts: 85323
  • Thank you received: 13937
  • MODERATOR
5 days 17 hours ago #370890

Hi,

Can you provide the URL of a page with the issue ?

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

  • Posts: 435
  • Thank you received: 19
  • Hikashop Business
5 days 17 hours ago #370892

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

  • Posts: 85323
  • Thank you received: 13937
  • MODERATOR
5 days 13 hours ago #370893

Hi,

I'm sorry but I don't see the problem on that page:
i.imgur.com/T0w0urd.png
It could be some kind of caching issue.
Please try with another browser.
If you use a CDN (like Cloudflare) or a server-side cache plugin, purge that cache as well.

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

  • Posts: 435
  • Thank you received: 19
  • Hikashop Business
5 days 13 hours ago #370896

Nicolas.
It's true and I apologize for that.
I was testing on another computer that had not removed the cookies/cache from the url.
The only thing left pending is not being able to upload files.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum