- Posts: 467
- Thank you received: 21
URGENT: Prices are not displayed — issue with Price Calculations
- Reincidente
-
Topic Author
- Offline
Less
More
7 months 3 weeks ago #370848
by Reincidente
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
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.
7 months 3 weeks ago #370852
by nicolas
Replied by nicolas on topic URGENT: Prices are not displayed — issue with Price Calculations
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.
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.
- Reincidente
-
Topic Author
- Offline
Less
More
- Posts: 467
- Thank you received: 21
7 months 3 weeks ago #370854
by Reincidente
Replied by Reincidente on topic URGENT: Prices are not displayed — issue with Price Calculations
Thanks Nicolas.
It works fine.
Best regards.
It works fine.
Best regards.
The following user(s) said Thank You: oxido
Please Log in or Create an account to join the conversation.
- Reincidente
-
Topic Author
- Offline
Less
More
- Posts: 467
- Thank you received: 21
7 months 2 weeks ago #370888
by Reincidente
Replied by Reincidente on topic URGENT: Prices are not displayed — issue with Price Calculations
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
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.
7 months 2 weeks ago #370890
by nicolas
Replied by nicolas on topic URGENT: Prices are not displayed — issue with Price Calculations
Hi,
Can you provide the URL of a page with the issue ?
Can you provide the URL of a page with the issue ?
Please Log in or Create an account to join the conversation.
- Reincidente
-
Topic Author
- Offline
Less
More
- Posts: 467
- Thank you received: 21
7 months 2 weeks ago #370892
by Reincidente
Replied by Reincidente on topic URGENT: Prices are not displayed — issue with Price Calculations
Please Log in or Create an account to join the conversation.
7 months 2 weeks ago #370893
by nicolas
Replied by nicolas on topic URGENT: Prices are not displayed — issue with Price Calculations
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.
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.
- Reincidente
-
Topic Author
- Offline
Less
More
- Posts: 467
- Thank you received: 21
7 months 2 weeks ago #370896
by Reincidente
Replied by Reincidente on topic URGENT: Prices are not displayed — issue with Price Calculations
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.
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.114 seconds