News:

Looking for documentation? Take a look on our wiki

Main Menu

Show Custom Field on Cart page

Started by kclaiborne, March 26, 2013, 20:07:21 PM

Previous topic - Next topic

kclaiborne

My client sells products in bulk, so there is a custom field for the amount the product comes in (for example /DZ would show $6.00 /DZ). I have done this on the product details page and the category page, but I'm having difficulty getting it show on the cart page unless it's set to be a cart variable, which I don't want it to be. Can anyone help? I have included the code I'm using below. This is located inside the foreach that displays each cart product (~line 131 in com_virtuemart/tmpl/cart/default_pricelist.php. I'm using template overrides, so I'm not sure of the exact line number). This code works if the custom field is a cart attribute.


<?php
//  vmdebug('$this->cart->pricesUnformatted[$pkey]',$this->cart->pricesUnformatted[$pkey]['priceBeforeTax']);
echo $this->currencyDisplay->createPriceDiv('basePriceVariant',''$this->cart->pricesUnformatted[$pkey],false);

//custom field display

echo $prow->customfields;) {