URGENT: Prices are not displayed — issue with Price Calculations

  • Posts: 424
  • Thank you received: 15
  • Hikashop Business
1 hour 54 minutes 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

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

  • Posts: 85269
  • Thank you received: 13920
  • MODERATOR
56 minutes 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

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

  • Posts: 424
  • Thank you received: 15
  • Hikashop Business
37 minutes ago #370854

Thanks Nicolas.
It works fine.
Best regards.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum