News:

Support the VirtueMart project and become a member

Main Menu

Base Price showing as admin but not shopper

Started by Brody, December 14, 2012, 04:50:24 AM

Previous topic - Next topic

caseyd

I am also in need of this - how can someone  know what the real price is?

cas

VM Team, any update as to when the option to show Base Price without tax or discount will be available?

cas

Over 3 months have gone by and no update from the VM team on this important request for US users!!!  HELP US PLEASE!!!

spacecadet

I think what I need is what this thread is about.

I am applying a discount on certain products in the store for one shopper group. I would like that shopper group to see displayed what they would normally pay, and theen the discounted price. At present, I can only get the discounted price to display.

IN the cart, the discount is shown, but not on the product display page.

Actually, I cant get any other prices to show at all on the front end for customers.

In Configuration, I have checked Show Prices, and FInal Price and Standardised Price. With this, the final price displays. That is good.

But no matter what other Prices I check in that list, no other prices will display.

What i would like is to show the usual price, and then the discounted price....

I am running VM2.0.20b on JM2.5.11.

jenkinhill

Are all price options available to display in your productdetails default_showprices.php template? Are you using overrides?
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

Milbo

I agree that there is a mistake. In fact the costprice should be only shown to the admin or refering vendor. I want to remove it and make it so that the baseprice is shown to everyone. The problem is just how todo it so, that the people who get used to this are not falling on their nose.

But in fact you can solve it with a small template override, just copy the default_showprices.php to your template override folder, then search for "if ($this->showBasePrice) {" , delete it, search for the corresponding } , delete it also, done.

So I think we should remove in for vm2.2, because then it is understandable that updaters must check their configuration.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

mimirmike

My problem with all of this is that when I go to set up prices it only takes one price. I could have $99 as cost but for whatever reason I cant set a different final price. Maybe I just dont know what I am doing but it shouldnt take any effort.

spacecadet

I did what Milbo suggested, even though I am not completely sure that it is intended to do what I want.

In any case, as far as I can see it has not made any difference.

No matter what boxes I check on the Configuration/Pricing page, it doesn't seem to make any difference to the price that is displayed on the front end.

I get the final sales price, and that is all. I can't get any other variation of the price to display, no matter what i do.

What i want is to show for discounted products is the usual final sales price, and then this month's special discounted price.

jenkinhill

Which prices are displayed (assuming display of all is selected in config) is controlled by the parice display template, default_showprices.php in productdetails. Many commercial template do not have the code to display all price options.
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

XenoGen

Here`s the solution to getting the Base Price to show up for ALL Shoppers.
This is important for those US Customers who want to display the two prices (OLD PRICE: $150    NEW PRICE: $100):

Milbo already mentioned the solution, but I want to elaborate because it`s not as obvious to many people (myself included).
Here is what you do:

1) Copy the file located here: components/com_virtuemart/views/productdetails/tmpl/default_showprices.php

2) Edit the file on your local computer (see below)

3) Copy the file back to your server at: templates/YOUR_TEMPLATE_NAME/html/com_virtuemart/productdetails/default_showprices.php
(make sure to change "Your_template_Name" with the actual name of the directory where your template files are located.)
The reason you are copying the files to your template directory is becasue this is creating the template override - it doesn't overwrite the base VirtueMart files, so it allows you to update the software and still keep your changes, just in case you were wondering why we copy it there.

4) Test it. It should now work. Celebrate!

5) Still the prices accordingly with CSS until it looks the way you'd like.


Here's the change you need to make to the DEFAULT_SHOWPRICES.PHP file before copying it back:

ORIGINAL CODE (Around line 164):

if ($this->showBasePrice) {
            echo $this->currency->createPriceDiv ( 'basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices );
            echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );   
            }


REPLACE WITH:

if ($this->showBasePrice) {
               echo $this->currency->createPriceDiv ( 'basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices );
            }
            echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );   


EXPLANATION:

Basically, the ECHO line displays the BasePrice. Originally, it's inside the IF staement, making it show only to the Admins. So, by moving it outside of the IF statement, it will now show to EVERYONE. Yay!

PS: If you need further help about getting VirtueMart 2 to work showing the two prices, with one scratched out, feel free to message me. I spent weeks with VM, until I finally was able to make it do everything I wanted it to, and it wasn't always easy, so I understand your frustration. :)

cas

XenoGen, thanks for the override, but we need the VM developers to add the option into the admin to display the base price.

To the VM developers: We have been asking for this forever!  PLEASE add the option into the admin to display the base price, so we don't have to deal with overrides forever!  This is functionality we all need in the USA, so please help us.

Chuck



serpento99

Quote from: XenoGen on July 09, 2013, 19:45:10 PM
ORIGINAL CODE (Around line 164):

if ($this->showBasePrice) {
            echo $this->currency->createPriceDiv ( 'basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices );
            echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );   
            }


REPLACE WITH:

if ($this->showBasePrice) {
               echo $this->currency->createPriceDiv ( 'basePriceVariant', 'COM_VIRTUEMART_PRODUCT_BASEPRICE_VARIANT', $this->product->prices );
            }
            echo $this->currency->createPriceDiv ( 'basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices );   





XenoGen, YOU HAVE ABSOLUTELY NO IDEA how much time you've saved me. ;D The base price is EXTREMELY important that I have displayed to my customers. I have invested so much time into this feature to work, then I got very frustrated when I found out there was no public option.  I'm so glad I didn't come to this problem before you posted the solution. My code was displayed on line 30 instead.

Anyways, for those who like to make your prices more attractive, throw in the <span> with some bold for example:

base price:

<span><strong style="color: #52B839; font-size: 16px; ">' . $this->currency->createPriceDiv ('basePrice', 'COM_VIRTUEMART_PRODUCT_BASEPRICE', $this->product->prices) . "</strong></span>


sale price:

<span><strong style="color: #d80000; font-size: 20px;">' . $this->currency->createPriceDiv ('salesPrice', 'COM_VIRTUEMART_PRODUCT_SALESPRICE', $this->product->prices) . "</strong></span>



Again, THANK YOU XENOGEN!

cas

VM team, are you going to do this?  Just tell us the status.   In the US we need the option to display the base price on the website.

spacecadet

this solution from XenoGen doesn't work for me....

actually, i can't get any prices to display except the final price, no matter what i do

I've turned off the template, and i get the same result

it doesn't make any difference which of the prices i check.

i've implemented the code above, and it doesn't change anything for me either

not sure what else there is to look at??

any ideas anyone?

j2.5.14 vm2.0.20b

thanks...

Brody

Wow, leave it for a while and something actually happens here! Anyway, I have 2.0.22c and it looks like my code at default_showprices.php contains this modification listed here. I did not put it there nor does it have anywhere near 164 lines of code. My store will not show prices according to how the above modification should show them.

Please help. I figured this would have been an easy fix by now...