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

How to Rearrange order of base price, sales price and discount

Started by websmith, April 14, 2016, 14:31:08 PM

Previous topic - Next topic

websmith

VM 3.0.16
Joomla 3.5.1

Is there a way to rearrange the order of a products label pricing? My products currently display Base price, then sales price then discount. I think it would be better to display Base price, then discount then sales price.

Would the "rounding digits" on pricing configuration page set the order of the price labels chosen? I thought I would ask here first to make sure. Thanks again for any suggestions.

jenkinhill

You can rearrange the layout by editing and overriding components/com_virtuemart/sublayouts/prices.php  - or if you already use overrides, by editing templates/YourJoomlaTemplate/html/com_virtuemart/sublayouts/prices.php

Rounding is not related to the order of prices, just the numerical display of each.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

websmith

Can I post the code I have from this page and maybe someone can help show me where to make the edit? I can usually kind of decipher some coding but this I have no clue. The few tries I made only made the discount disappear.
You can rearrange the layout by editing and overriding components/com_virtuemart/sublayouts/prices.php  -

I do not have this overrides.
or if you already use overrides, by editing templates/YourJoomlaTemplate/html/com_virtuemart/sublayouts/prices.php

GJC Web Design

its not complicated

u don't need to understand what it is doing.. it is just a series of echoed statements some surrounded by if statements

each one is a price display

they start at line 42 if prices present

this is the sales price
echo $currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $product->prices);

this is the discount

echo $currency->createPriceDiv ('discountAmount', 'COM_VIRTUEMART_PRODUCT_DISCOUNT_AMOUNT', $product->prices);

this is the tax

echo $currency->createPriceDiv ('taxAmount', 'COM_VIRTUEMART_PRODUCT_TAX_AMOUNT', $product->prices);

if those are enabled in the admin they show
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