VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: Daggett on May 08, 2012, 12:44:40 PM

Title: How can i enter Price per Liter?
Post by: Daggett on May 08, 2012, 12:44:40 PM
Hi,

i have virtuemart 2.0.6 with Joomla 2.5.4 for a wine-shop. I will sell wine in 0,75 liter bottles, but  i need the price per liter too, but the price for a liter must only shown.
In the cart should write the price for the 0,75 liter bottle.

Can sombody help me?

Regards
Title: Re: How can i enter Price per Liter?
Post by: balai on May 08, 2012, 16:34:40 PM
You can create a custom field for that.

Try to create a String Custom field and set it as "Cart Attribute" and "Hidden"
Title: Re: How can i enter Price per Liter?
Post by: PRO on May 08, 2012, 17:18:55 PM
http://forum.virtuemart.net/index.php?topic=99225.msg327847#msg327847

Title: Re: How can i enter Price per Liter?
Post by: Daggett on May 09, 2012, 09:34:39 AM
Hi Banqouet,

thank you very very very much  :).
Title: Re: How can i enter Price per Liter?
Post by: coppo82 on July 26, 2012, 19:53:58 PM
Quote from: Daggett on May 08, 2012, 12:44:40 PM
Hi,

i have virtuemart 2.0.6 with Joomla 2.5.4 for a wine-shop. I will sell wine in 0,75 liter bottles, but  i need the price per liter too, but the price for a liter must only shown.
In the cart should write the price for the 0,75 liter bottle.

Can sombody help me?

Regards

hi i have the same problem , can you tell me please your solution ???  how the system calculate the price pro liter ???
Title: Re: How can i enter Price per Liter?
Post by: PRO on July 27, 2012, 14:10:06 PM


If you sell 3/4 Liter
BUT, need to show full liter price. Its "math"

Divide the price by 3, then multiply by 4


<?php $literprice =$this->product->prices['salesPrice']/3 *4 ;
    echo 'Price Per Liter: ' .number_format($literprice, 2, ".", "");?>

^^^ that uses sales price.

more here
http://forum.virtuemart.net/index.php?topic=104194.0