Author Topic: (SOLVED) Base Price Issue  (Read 2175 times)

datalab

  • Beginner
  • *
  • Posts: 27
(SOLVED) Base Price Issue
« on: July 15, 2014, 11:17:20 AM »
Hello.

I can see that the base price shown only when the admin is logged in. How to make it visible to Guests and default users? VM 2.6.6, Default template.

Thanks!

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28746
  • Always on vacation
    • Jenkin Hill Internet
Re: Base Price Issue
« Reply #1 on: July 15, 2014, 11:22:43 AM »
The base price is what a product costs you, ie it does not include your profit margin or other markups and does not include tax. Now, why would you want you customers to know how much profit you make on a product?
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 4.2.5 10924 J! 3.10.11 PHP 8.2.7

datalab

  • Beginner
  • *
  • Posts: 27
Re: Base Price Issue
« Reply #2 on: July 15, 2014, 11:36:02 AM »
Because im using the whole system in a different way that people mostly do!

And in that field i wanna have the price i sell!

Anyway, how can i do it? can i?


GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10881
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Base Price Issue
« Reply #3 on: July 15, 2014, 12:16:58 PM »
select show base price in config->prices

then in the price template either (if your using standard templates)

$this->showBasePrice = 1;

or add

echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3517
  • VirtueMart Version: 4.0.12.10777
Re: Base Price Issue
« Reply #4 on: July 15, 2014, 12:20:45 PM »
Hmm..

It really depends how your business realtionships with suppliers are structured.  Base price is whatever you chose it to be and is not as prescriptive as saying

Quote
The base price is what a product costs you, ie it does not include your profit margin or other markups and does not include tax. Now, why would you want you customers to know how much profit you make on a product?

It certainly can be used in such a manner and has been structured to facilitate such an approach

However some users have supplier agreements where discounts vary widely across product ranges and even within product ranges. 
Trying to get VM to automate pricing uplift outside of a simple set of scenarios may prove too much of a headache.

As a consequence some users chose the base price to store ex-tax price and manage margins away form VM

As GJC states it is the "if"  that is preventing baseprice being shown for non admin users

You will have to create template overrides in category and product views

Code: [Select]
if ($this->showBasePrice) {
echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);
if (round($this->product->prices['basePrice'],$this->currency->_priceConfig['basePriceVariant'][1]) != $this->product->prices['basePriceVariant']) {
echo $this->currency->createPriceDiv ('basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices);
}

}
Regards
A

Joomla 3.10.11
php 8.0

datalab

  • Beginner
  • *
  • Posts: 27
Re: Base Price Issue
« Reply #5 on: July 15, 2014, 22:10:52 PM »
Where do i do this????

which File??

 
select show base price in config->prices

then in the price template either (if your using standard templates)

$this->showBasePrice = 1;

or add

echo $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices);



GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10881
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Base Price Issue
« Reply #6 on: July 15, 2014, 23:35:28 PM »
Hmm - if your going to build a VM site I would suggest you have a bit of a look around what it is and what it does..

the file naming is very logical, following normal Joomla practice

so ->  over ride  components/com_virtuemart/views/productdetails/tmpl/default_showprices.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

datalab

  • Beginner
  • *
  • Posts: 27
Re: Base Price Issue
« Reply #7 on: July 16, 2014, 00:54:12 AM »
Thanks for your help dudes, i did it!

Nice one!

cbabino

  • Beginner
  • *
  • Posts: 6
Re: (SOLVED) Base Price Issue
« Reply #8 on: July 16, 2014, 16:20:53 PM »
Hello I have the same problem and I would like an idea for the views in category and wirtuemart. Because I tried to use the above solution but blank my website.

Any suggestion will be welcome

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10881
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: (SOLVED) Base Price Issue
« Reply #9 on: July 17, 2014, 10:50:45 AM »
just checked the code in components/com_virtuemart/views/category/tmpl/default.php

looks the same to me

see no reason why adding $this->showBasePrice = 1;  won't work



GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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