VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: t_zaharia on September 18, 2013, 15:22:12 PM

Title: Show product' s price in add-to-cart pop-up
Post by: t_zaharia on September 18, 2013, 15:22:12 PM
Hello :)

We have joomla 2.5.9 and virtuemart 2 installed.
It is our project' s requirement to show product' s price (and name, quantity) in the add-tocart pop-up.
The file I need to edit is components/com_virtuemart/controllers/cart.php, right?
Echoing $this->loadTemplate('showprices') there did not work though...

Can anyone help, please?

Thanks in advance,
Theoni
Title: Re: Show product' s price in add-to-cart pop-up
Post by: jenkinhill on September 18, 2013, 15:32:39 PM
http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Show product' s price in add-to-cart pop-up
Post by: t_zaharia on September 19, 2013, 11:00:06 AM
I' m sorry, we have joomla 2.5.9, virtuemart 2.0.20b and PHP Version 5.4.19 installed.

Thanks in advance,
Theoni
Title: Re: Show product' s price in add-to-cart pop-up
Post by: jenkinhill on September 19, 2013, 12:39:58 PM
Both your Joomla and VirtueMart versions have known security issues, so you should consider updating.
http://forum.virtuemart.net/index.php?topic=118683.0
http://virtuemart.net/news/list-all-news/446-important-security-release-vm-team-at-joomladay-germany

Current VM version is 2.0.22d - in this version there is a cart popup template file at  components/com_virtuemart/views/cart/tmpl/padded.php
If editing this file be sure to use the edited file as a template override.
Title: Re: Show product' s price in add-to-cart pop-up
Post by: t_zaharia on September 19, 2013, 15:57:01 PM
Hello!

Thank you very much, I just updated to the latest virtuemart version.

I found the file, thank you.

Could you tell me where the continue_link is set?

Thank you in advance,
Theoni
Title: Re: Show product' s price in add-to-cart pop-up
Post by: Maxim Pishnyak on September 20, 2013, 12:49:48 PM
You could check this thread 'Change continue shopping action'.
Title: Re: Show product' s price in add-to-cart pop-up
Post by: t_zaharia on September 20, 2013, 13:06:10 PM
Hello!
Thanks for the reply, I had been trying to add $_SERVER['HTTP_REFERER'] to the correct spot (also tried at view.html.php ...), but that link helped :)

Sorry to be asking much, but the price of the product isn' t shown.. Isn' t $this->product->product_price the correct variable?


Thanks a lot,
Theoni
Title: Re: Show product' s price in add-to-cart pop-up
Post by: Maxim Pishnyak on September 21, 2013, 13:27:14 PM
Check default_showprices.php
Title: Re: Show product' s price in add-to-cart pop-up
Post by: t_zaharia on September 25, 2013, 11:16:37 AM
Hello!
Thank you for the reply.

It looks like the variables $this->product->prices['salesPrice'], $this->product->price, $this->product->name don' t return any values when used in the padded.php...and echo "<pre>"; print_r( $this->products ); echo "</pre>"; returns 1..


Thank you,
Theoni
Title: Re: Show product' s price in add-to-cart pop-up
Post by: Maxim Pishnyak on September 26, 2013, 15:09:25 PM
http://forum.virtuemart.net/index.php?topic=117960.msg404403#msg404403
Title: Re: Show product' s price in add-to-cart pop-up
Post by: t_zaharia on September 26, 2013, 17:02:23 PM
Hi!
I found what was wrong, there was an override of a file that messed with the procedure, I restored the default and... problem solved!

Thank you all,
Theoni