VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: pm4698 on June 10, 2016, 23:48:15 PM

Title: Show price per product in cart
Post by: pm4698 on June 10, 2016, 23:48:15 PM
I use joomla 2.5 and virtuemart 2.6.10

In cart page i need for each product to get the final price, quantity and id.
With this:
$wantedpricecart = $product->salesPrice;
      $wantedproductid = $product->virtuemart_product_id;
      $wantedproductquantity = $product->quantity;

get quantity of product in cart and product id but i cannot get product final price.

Any ideas?
Title: Re: Show price per product in cart
Post by: K&K media production on June 11, 2016, 00:32:23 AM
 $product->prices['salesPrice']
Title: Re: Show price per product in cart
Post by: pm4698 on June 11, 2016, 18:01:33 PM
I have tried this but i get no result at all. Any other ideas?

I remind you that i do the this inside the cart php file. Maybe should i include something to take the price?Or something else?

Thank you
Title: Re: Show price per product in cart
Post by: Studio 42 on June 11, 2016, 18:04:44 PM
Hi,
Can you not update to VM 3, i think the answer work for VM3 only.
In all case vm 3.0.14 have security fix, so i t's better for you to update it.
Title: Re: Show price per product in cart
Post by: pm4698 on June 11, 2016, 18:14:37 PM
I want too but my client does not unfortunately. He says he has to many customizations that are hard to identify now and transfer to vm3.

In any case, if someone has answer for Virtuemart 2, i would be grateful!
Title: Re: Show price per product in cart
Post by: GJC Web Design on June 12, 2016, 00:17:45 AM
just echo out what's in the product loop of the cart so u can see if ind. prices are there

otherwise isn't product total price / quantity?
Title: Re: Show price per product in cart
Post by: pm4698 on June 12, 2016, 09:28:01 AM
I found the answer after lots of tests:

$product->product_price