price

  • mahon
  • Topic Author
  • New Member
  • New Member
More
12 years 9 months ago #19143 by mahon
price was created by mahon
hello, appears to me in the module price without tax, I need show in module price after sale with tax and if is possible with no decimal places.
you advise me if it can be easily adapted?

many thanks

Please Log in to join the conversation.

More
12 years 9 months ago #19152 by ivan.milic
Replied by ivan.milic on topic Re: price
open
modules\mod_vmscroller\helper.php

find this:
Code:
if ($show_price) { $db->setQuery("SELECT REPLACE(REPLACE(C.currency_positive_style,'{symbol}',C.currency_symbol ),'{number}',cast(P.product_price as decimal(19,2))) As pricetext FROM #__virtuemart_product_prices as P LEFT JOIN #__virtuemart_currencies as C on C.virtuemart_currency_id = P.product_currency WHERE P.virtuemart_product_id = '" . $product_id . "' LIMIT 1 "); $price_object = $db->loadObject(); //$price = $pr->prices['salesPrice']; $price = '<div class="productPrice">'.$price_object->pricetext.'</div>'; }

replace all of that with:

Code:
if ($show_price) { $price = '<div class="productPrice">'.$pr->prices['basePriceWithTaxText'].'</div>'; }

Please Log in to join the conversation.

  • mahon
  • Topic Author
  • New Member
  • New Member
More
12 years 9 months ago #19154 by mahon
Replied by mahon on topic Re: price
Unfortunately, does not work 'basePriceWithTaxText'.
if I use 'basePriceWithTax' or 'salesPrice' is missing currency and there are 3 decimal places.

I would like price after sale with tax with currency and with no decimal places.

if I only change .....cast(P.product_price as decimal(19,0)))....
is with no decimal, but I can not change price :(

Please Log in to join the conversation.

More
12 years 9 months ago #19164 by ivan.milic
Replied by ivan.milic on topic Re: price
If you have simple tax you can just do:

...cast(P.product_price * 1.18 as decimal(19,0)...

where in this example tax is 18%
The following user(s) said Thank You: mahon

Please Log in to join the conversation.

Time to create page: 0.157 seconds
Powered by Kunena Forum