php - Echo price of product in virtuemart cart -
i use joomla 2.5 , virtuemart 2. tried echo script built php. inside cart file inside foreach function goes through each product need save variable product id, quantity , sales price.
i can show product id , quantity this:
$wantedproductid = $product->virtuemart_product_id; $wantedproductquantity = $product->quantity;
but have problem price. echoed $this
, this:
virtuemartcart object ( [products] => array ( [812] => stdclass object ( [virtuemart_manufacturer_id] => 11 [slug] => hill-s-puppy-healthy-development-large-breed-koutavia-anaptyksi-kotopoulo-11kg [published] => 1 ... ... [pricesunformatted] => array ( [baseprice] => 70.6 [basepricewithtax] => 0 [discountedpricewithouttax] => 60.31 [salesprice] => 60.31 [taxamount] => 0 [salespricewithdiscount] => 60.31 [discountamount] => 57.4 [pricewithouttax] => 70.6 [subtotalproducts] => 0 [2diff] => -9.585 [812] => array ( [costprice] => 63.90000 [baseprice] => 63.9 [basepricevariant] => 63.9 [basepricewithtax] => 0 [discountedpricewithouttax] => 54.32 [pricebeforetax] => 63.9 [salesprice] => 54.32 [taxamount] => 0 [salespricewithdiscount] => 54.32 [salespricetemp] => 54.32 [unitprice] => 0 [discountamount] => 14.99 [pricewithouttax] => 63.9 [variantmodification] => 0 ... ...
what need example value: [salesprice] => 54.32
how can save [salesprice]
in value?
this should trick:
echo $this->pricesunformatted['salesprice']
Comments
Post a Comment