News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Showing quantity price table - js-recalculate

Started by JestaBlunt, April 05, 2016, 23:03:20 PM

Previous topic - Next topic

JestaBlunt

hi,

i have the following problem: i have set up a price table to be shown (page is in german, i try to translate ;) )

1 piece € 1,19
From 100 pieces € 1,00

it working. but when i add a custom string which is changing the price (here "silver-water" adding +5 €, the calculated price isnt changing, only the one create with "createpricediv".

is there a way to make the self-produced price dynamic?

foreach ($product->allPrices as $key => $price) {
$itemCnt++;
if ($price["price_quantity_start"] != 0 ) {
if ( $itemCnt == 1 ) {
echo $price["price_quantity_start"]." Stk. <strong>€&nbsp;".number_format($price["product_price"],2,',','.')."</strong><br/>";
}
else {
echo "Ab ".$price["price_quantity_start"]." Stk. <strong class='price_discount'>€&nbsp;".number_format($price["product_price"],2,',','.')."/Stk.</strong><br/>"; }
}
else {
echo "1 Stk. <strong>".$currency->createPriceDiv ('priceWithoutTax', '', $product->prices)."</strong><br/>";


}
}


Test-product:
http://bp-gerd-test.pachlerschatek.at/index.php/fruchtsaft-erdbeer-pago-0,2literew-54-1255-detail

VM 3.0.14
Joomla 3.5.0

thx,
peace jesta

Studio 42

The simplest way, is to use same class as createprice div use.
When you have a price update, this check for the class > PricesalesPrice for eg.
This need to be in a container class > product-price
so if your own price use for salesPrice eg.
<div class="product-price"><span class="PricesalesPrice">10.0€</span></div>
This should update. same time as original salesPrice

This are all value that can be returned and most can be used same way depending your VM config :
basePrice
basePriceVariant
basePriceWithTax
discountAmount
discountedPriceWithoutTax
messages
priceWithoutTax
salesPrice
salesPriceWithDiscount
taxAmount
unitPrice
variantModification