Page 1 of 2

shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 7:59 am
by ReneH4
Some of my customers do not understand that they have to "enter" when they change the number of products in shoppingcart.php.

I think that is obvious, I recently visited a shop that does this automatically, and it's very convenient.

Has someone written a hook for this?

What it should do:
  • Change product total amount on the fly
  • Remove product when number changed to 0 (with optionally a popup asking to confirm)


I am running 1079 at 7.4.

Re: shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 8:13 am
by Fiber
ReneH4 wrote: Thu Jul 29, 2021 7:59 am
Has someone written a hook for this?

I am running 1079 at 7.4.
This one works with attributes, maybe it can be adapted to what you want?

Re: shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 9:15 am
by raiwa
I have this one:
https://www.oscaddons.com/en/commercia ... -p-38.htmls not updated for the latest Phoenix versions. Let me know if you are interested. I’ll then check for compatibility.

Re: shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 9:16 am
by raiwa
Fiber wrote: Thu Jul 29, 2021 8:13 am
ReneH4 wrote: Thu Jul 29, 2021 7:59 am
Has someone written a hook for this?

I am running 1079 at 7.4.
This one works with attributes, maybe it can be adapted to what you want?
OP asked for shopping cart, not for product info.

Re: shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 9:18 am
by Fiber
raiwa wrote: Thu Jul 29, 2021 9:16 am OP asked for shopping cart, not for product info.
oeps overread..

Re: shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 9:28 am
by ReneH4
Thanks Fiber, but as Rainer says, I would like exactly this on shoppingcart.php.
Fiber wrote: Thu Jul 29, 2021 8:13 am
ReneH4 wrote: Thu Jul 29, 2021 7:59 am
Has someone written a hook for this?

I am running 1079 at 7.4.
This one works with attributes, maybe it can be adapted to what you want?

Re: shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 9:31 am
by ReneH4
Rainer,

I think this is indeed what I am looking for.

However I do not need the extra + and - button, since they are in core, AND I un-installed them for better vieuw on mobile (horizontal space).

Could you rewrite this add-on and get this working for 1079? Are there any core changes or is it all in a hook-file?
I prefer a hook as you may understand.

raiwa wrote: Thu Jul 29, 2021 9:15 am I have this one:
https://www.oscaddons.com/en/commercia ... -p-38.htmls not updated for the latest Phoenix versions. Let me know if you are interested. I’ll then check for compatibility.

Re: shoppingcart.php price change on the fly

Posted: Thu Jul 29, 2021 11:44 am
by ReneH4
I have sent you an email through the forum @raiwa .

Re: shoppingcart.php price change on the fly

Posted: Mon Aug 02, 2021 12:32 pm
by ReneH4
I installed the (payed) AddOn by raiwa, and it does exactly what it should.

Many of my customers are skilled motorcycle mechanics but many of them are lost behind the screen.

@raiwa 's AddOn gets them a bit closer. Rated *****.

Re: shoppingcart.php price change on the fly

Posted: Mon Aug 02, 2021 4:55 pm
by ReneH4
And since I have a new template file, it was time to tweak it a bit more.
It now shows a STOCK-info line of text below the products name. I like this better that the BIG green V or BIG red X :-)

It was a simple tweak, but if anyone wants the code I can provide it.