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

Change price shown in chart

Started by micropalla, July 28, 2022, 09:05:05 AM

Previous topic - Next topic

micropalla

Hi! I am using J 4.1.5 with VM 4.0.6.

Right now in my chart i have 3 prices: the discounted one, the amount of the discount and the total price.
This is a little weird and i would like to replace the first discounted price with the base price.

For example as you can sei in the attached image i have a discounted price of 200 euros, a discount of 300 and a total price of 200.
Instead I would like to have the base price of 500 euros, a discount of 300 and a total price of 200.

Which is the file I have to change to modify this? I think I just need to change the type of price it uses in the first column replacing the discounted one with the base one.
Thank you!

GJC Web Design

override & change

components\com_virtuemart\sublayouts\prices.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

micropalla

Are you sure this is the file that affects the layout of the cart?
I try to editi it but nothing changes...

GJC Web Design

#3
I have no idea what your template uses but if it's up to date then it should be using this

********** edit *****************

sorry -- just saw you meant the cart - I thought u meant the product price displays
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

micropalla

I have found the strings in com_virtuemart/views/cart/tmpl/default_pricelist.php.

This is the code that can be changed

<td class="vm-cart-item-basicprice" >
<?php
if (VmConfig::get ('checkout_show_origprice'1) && $prow->prices['discountedPriceWithoutTax'] != $prow->prices['priceWithoutTax']) {
echo '<span class="line-through">' $this->currencyDisplay->createPriceDiv ('basePriceVariant'''$prow->pricesTRUEFALSE) . '</span><br />';
}
if ($prow->prices['discountedPriceWithoutTax']) {
echo $this->currencyDisplay->createPriceDiv ('discountedPriceWithoutTax'''$prow->pricesFALSEFALSE1.0falsetrue);
} else {
echo $this->currencyDisplay->createPriceDiv ('basePriceVariant'''$prow->pricesFALSEFALSE1.0falsetrue);
?>

</td>


I changd basePriceVariant with basePrice and it seems to work.

Now I have as in the attached image.

I wonder how to change code to have on the third column only the first price with no strike and not also the discounted one.

Someone can help me with code?

Thanks

GJC Web Design

try just

echo $this->currencyDisplay->createPriceDiv ('basePriceVariant', '', $prow->prices, FALSE, FALSE, 1.0, false, true);
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Mike J

Hello micropalla,

RE: "I am using J 4.1.5 with VM 4.0.6".

Apart from the basePriceVariant / basePrice situation, can you successfully place live orders?

The reason I'm asking is I tried many times with those exact versions but couldn't.

Would love to know if you can as it would reveal that my problem is server set up related (unless you've made some custom tweaks to 4.1.5 / VM 4.0.6 which you'd be willing to share).

VirtueMart 4.0.2 10661
Joomla! ‎3.10.11
PHP 7.4.30
mysql 5.7.39

micropalla

Yes, it seems to work even if I have problems sending the email to the buyer.
But probably some mistakes in my configuration.