Interactive pricing weirdness

Phoca Cart - complex e-commerce extension
Stuart James
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 27 Nov 2022, 14:02

Interactive pricing weirdness

Post by Stuart James »

Joomla: 4.2.5
Phoca Cart: 4.0.5

I have set up a product:

https://1drv.ms/u/s!AnvE0-oA9oSWgQFeZ6- ... 8?e=BU6QfS

The product has a "Material" attribute:

https://1drv.ms/u/s!AnvE0-oA9oSWgQDxQsr ... j?e=scuECy

The attribute has two options - "Mild Steel":

https://1drv.ms/u/s!AnvE0-oA9oSWfZjeiUG ... 4?e=cbUaVZ

(the "Mild Steel" option is the default option)

and "Corten":

https://1drv.ms/u/s!AnvE0-oA9oSWfoSCvBG ... A?e=1BAb4G

the "Corten" option increases the price by $10.

The General Display Option "Interactive Change (Price)" option is set on:

https://1drv.ms/u/s!AnvE0-oA9oSWf1JLFlK ... E?e=4mi5Kc

continued in next post
Stuart James
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 27 Nov 2022, 14:02

Re: Interactive pricing weirdness

Post by Stuart James »

If I toggle the option between "Mild Steel" and "Corten", the price is increased by $10 as expected:

https://1drv.ms/u/s!AnvE0-oA9oSWgQP_-oy ... x?e=00XdVu

https://1drv.ms/u/s!AnvE0-oA9oSWgQRQUVM ... O?e=CEhu6G

If I toggle the option back to "Mild Steel", the price is reduced by $10 as expected.

So far, so good.

If I toggle the options back and forth another 4 times, the interactive pricing appears to stop working:

https://1drv.ms/u/s!AnvE0-oA9oSWgQJXzud ... U?e=qU9n3F

Any further toggling of the options has no effect on the price.

You can have a look at this on the website I am working on: http://www.rnsplasma.com/index.php/prod ... ls/2-cross

I have tried from a couple of different browsers, and from different machines. I have also tried using a different product with a similar setup. The results are the same.

Does anyone have any thoughts on this?
Stuart James
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 27 Nov 2022, 14:02

Re: Interactive pricing weirdness

Post by Stuart James »

I should add that this appears to be a visual thing - when adding the product to the cart, the correct price is set in the cart - despite what was on the screen at the time the "Add to Cart" button was clicked.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Interactive pricing weirdness

Post by Jan »

Hi, I get this error when the page is not updated (when the price is not updated by ajax):

Code: Select all

><b>Warning</b>:  session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /opt/alt/php74/var/lib/php/session)in<b>/home/vlccx3u54bee/public_html/libraries/vendor/joomla/session/src/Storage/NativeStorage.php</b> on line <b>114</b><br/>
Not sure what this error means, maybe this is much more a question on Joomla developers.

But for test only - try to disable displaying of PHP errors, so we know, the problem is caused by displaying this warning or by something else.

If you disable displaying of PHP errors (in Joomla Global configuration), do you get the same errors?

You can debug the AJAX in e.g. Google Chrome DevTools:

Image

Jan
If you find Phoca extensions useful, please support the project
Stuart James
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 27 Nov 2022, 14:02

Re: Interactive pricing weirdness

Post by Stuart James »

Thank you Jan - and apologies for the late reply.

You are correct - disabling the display of PHP errors stops the behaviour I have observed.

Not sure where this leaves me - I'll have to give it some thought.
Post Reply