VirtueMart Forum

VirtueMart 2 + 3 => Administration & Configuration => Topic started by: Brody on December 14, 2012, 04:50:24 am

Title: Base Price showing as admin but not shopper
Post by: Brody on December 14, 2012, 04:50:24 am
Hey guys,

Another base price question that I can't find any answers to. I had changed the language file so that "base price" would read MSRP since we are a business to business webstore only. I thought it worked fine because I was always viewing the store logged in as ADMIN.

When I log in as admin I see,

MSRP: $62.50
Your Price: $34.38

When I log in as a customer I see,

Price:
Your Price $22.50

I have been racking my brain trying to figure out what "box" I haven't clicked. Is there anyway to have it display to the customer like it displays to me, the admin???

Any help would be appreciated. I see there are a lot of price display questions on here that go unsolved. I hope this doesn't just add to that pile.

Joomla Version 2.5.2
VM Version 2.0.14
Title: Re: Base Price showing as admin but not shopper
Post by: bytelord on December 14, 2012, 08:56:46 am
Hello,

Yes this is normal ... base price on the fe is only disaplayed on the store administrator ... under configuration-> Pricing you could see the tool tip exclanation on each price ...
the "Price:" Is just a label ... i f you don't like it you could user some CSS to hide it: http://forum.virtuemart.net/index.php?topic=110466.msg370249#msg370249

Prices we normally use on the front end:

Salesprice without tax  (your price without tax)
Tax amount
Baseprice with Tax, but without discounts
Final salesprice     (Your SALES Price)
Salesprice with discount, but without override
Discount amount

You could try to check them all and test them with the front end to see what is been displayed, is the best way to understand better how prices are working

Regards
Title: Re: Base Price showing as admin but not shopper
Post by: nickwiebe on February 13, 2013, 17:37:28 pm
This is really frustrating not being able to show the base price along with the discounted price to the customer.  Why would this not be an option.  You have a product and want to give an instant rebate but it only shows the discounted price and the discount.  I want to show the customer what the original price is, how the heck can I do this when only the administrator can do this?  The administrator is not the person I need shopping at my store.

2 thumbs down on this setup, this should be a very basic and simple to use feature in the product.
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on February 13, 2013, 18:48:33 pm
The base price is the price at which goods are bought by the vendor. From this price is added the profit margin and tax (if any) using the calculation rules to give the retail price. IT is shown only to the admin on the FE so that they can check that profit etc will be OK.  This is the standard required by large stores with a constant markup, and the selling prices are automatically calculated. If required the final price shown can be overriden to make it £5.95 instead of £5.88, for example using ther price override.

In configuration/pricing, from the customer perspective the "Baseprice with Tax, but without discounts" would be the original price and the "Final salesprice" is the discounted price they pay.
Title: Re: Base Price showing as admin but not shopper
Post by: cas on March 11, 2013, 09:13:38 am
After searching and reading lots of posts, I am still not able to get the pricing to display on the frontend the way I need.  I want three prices to display on the frontend: The retail price, the discount amount, and the final price where the discount has been applied.  In the product admin it seems to work perfectly.  As an example, when I enter $100 in the Cost Price field, which is my actual cost, and I have a Profit Margin calculation rule of 2x setup, the Base Price in the admin displays $200, which is correct retail price, and then I have a Discount rule setup that brings the Final Price down to $150.   This is working perfectly in the Admin.   But on the frontend, I cannot get it to display the $200 retail price.  Even when I check all the boxes in the admin configuration pricing page, it still does not display the $200 price.  It does display the $50 Discount amount and the final sale price of $150 properly, but just will not display the $200 retail price.

In a post above it says, "The base price is the price at which goods are bought by the vendor."  Assuming this statement means the field where I should enter my actual product cost, but I cannot even enter anything in the Base Price field, it is a calculated only field.  Shouldn't I enter my actual vendor cost in the Cost Price field?  So if I'm correct and the Cost Price field is my actual cost, and the Base Price is the calculated retail price before the discount is applied, then why can't we display the Base Price on the frontend? 

Thanks for the help,
Chuck
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on March 11, 2013, 13:08:48 pm
Here are two examples. Using VM2.0.20 with no overrides, all prices set to display in configuration.  Base price of product £3,200 with simple profit margin added of £40 per product, VAT at 20% (all calculated from the base price).  First example shows discount achieved by price override. Second image is same product without price override but with £200 discount applied by calculation rule (I could also use %).

If I were doing this for real I would use overrides to change the layout and to price descriptions used.



[attachment cleanup by admin]
Title: Re: Base Price showing as admin but not shopper
Post by: cas on March 11, 2013, 19:00:15 pm
Hi Kelvyn,

Thanks for the example.  It think it demonstrates that for websites in the US, we need another frontend price display option to be added to VM called the "Base Price" or "Retail Price", that would not have the discounts or taxes added.  In your example, it would be the Base Price $3240 that we need to display for US websites as the retail price.  The problem with the frontend display option of "Base price with tax" for US websites is that we cannot calculate tax until the user is registered and logged in, because we have different tax rates for each county within each state, and if the customer doesn't live in our state, then there is no tax to be collected from that customer at all.  So to display "Base Price with Tax" on the product details page does not make sense for US websites.  We usually only show the Tax amount in the shopping cart when the user is logged in, and if tax is to be applied based on their shipping address.

And I agree with you that we only want the Cost Price to be displayed on the frontend when an admin is logged in, but in the admin configuration for pricing, the label is "Baseprice" and the tooltip says "it could be the Cost Price or the calculated price", but since we need the option to display the Base Price in the US as the Retail Price, why not have this as two separate options, one for Cost Price if Admin is logged in, and another one for the Base Price for everyone to see? 

So to sum up my post, we need another option added to display the Base Price on the frontend for all users, (which would be the result of the Cost Price with Profit Margin calculations added, but without discounts and taxes added).  Basically, this Base Price result would be the Retail Price, so maybe use Retail Price as the label if you think that makes more sense than Base Price? 

By the way, as a test I checked the box to display the "Base Price with Tax" just to see what would display on the frontend, but nothing displays?  I attached a screenshot of my product admin pricing page so you can see what I have entered.  I need the $2775 Base Price to be displayed on the frontend as the Retail Price. 

FYI, I am using VM 2.0.20.

Thanks,
Chuck   

[attachment cleanup by admin]
Title: Re: Base Price showing as admin but not shopper
Post by: cas on March 15, 2013, 18:11:53 pm
Any update on our requirement for US sites to display Base Price without Tax?
Title: Re: Base Price showing as admin but not shopper
Post by: naoko15 on March 16, 2013, 23:25:01 pm
Hello, is there any solution for this? i need the base price being shown to guests and shoppers as well. Is it possible to do it? How? Please, it is very important!

Thanks a lot

Using VM2.0.12f and J2.5
Title: Re: Base Price showing as admin but not shopper
Post by: cas on March 20, 2013, 07:07:26 am
Any update on when the Base Price without tax will be available?     I need to update my customer on the status.

Thanks,
Chuck
Title: Re: Base Price showing as admin but not shopper
Post by: cas on March 27, 2013, 22:53:48 pm
Any update on when the Base Price without tax will be available?
Title: Re: Base Price showing as admin but not shopper
Post by: chrlar on March 28, 2013, 10:47:26 am
I don't mean to interfer, but I just solved my logged in / logged out price problem:
http://forum.virtuemart.net/index.php?topic=114078.0

That is, if I was not logged in (front end) it displayed the price without vat tax.
And if I logged in (front end) the price was right, with vat tax (and also specifying the tax).

Then we removed the shopper group we had added in the tax & calculation rule, and that did it.

Could this be useful information for your problem?

:)


[attachment cleanup by admin]
Title: Re: Base Price showing as admin but not shopper
Post by: cas on March 28, 2013, 19:06:42 pm
Hi chrlar,

In the USA this is not a bug, but a missing display feature for the product detail page.  We need the product admin to have one additional price display option added to allow us to display the Base Price without tax, regardless if the user is logged in or not.  In the USA we do not show tax on the product detail page.   We only show tax in the shopping cart when the user is logged in and we can determine if any tax is due, and if tax is due, then which tax % to apply based on the state & county location of the store.

Any update from the VM team when this price display option will be added? 

Thanks,
Chuck   
Title: Re: Base Price showing as admin but not shopper
Post by: herek on April 05, 2013, 16:48:08 pm
The base price is the price at which goods are bought by the vendor. From this price is added the profit margin and tax (if any) using the calculation rules to give the retail price. IT is shown only to the admin on the FE so that they can check that profit etc will be OK.  This is the standard required by large stores with a constant markup, and the selling prices are automatically calculated. If required the final price shown can be overriden to make it £5.95 instead of £5.88, for example using ther price override.

In configuration/pricing, from the customer perspective the "Baseprice with Tax, but without discounts" would be the original price and the "Final salesprice" is the discounted price they pay.

Hello, this is the Cost price, not base price. I agree that the admin does not want the Cost Price to be shown, but base price is the price that all starts to the customer. After this base price, it will apply tax, discount, etc and create the Final price.

Is there any way to show WAS: US$ 1,000.00  NOW: US$ 800.00.

Thank you
Title: Re: Base Price showing as admin but not shopper
Post by: cas on April 05, 2013, 23:58:35 pm
Hello, this is the Cost price, not base price. I agree that the admin does not want the Cost Price to be shown, but base price is the price that all starts to the customer. After this base price, it will apply tax, discount, etc and create the Final price.

Is there any way to show WAS: US$ 1,000.00  NOW: US$ 800.00.

Thank you

Yes, this is exactly what everyone in the US needs. 

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

Thanks
Title: Re: Base Price showing as admin but not shopper
Post by: caseyd on April 09, 2013, 00:39:26 am
I am also in need of this - how can someone  know what the real price is?
Title: Re: Base Price showing as admin but not shopper
Post by: cas on April 20, 2013, 21:05:47 pm
VM Team, any update as to when the option to show Base Price without tax or discount will be available?
Title: Re: Base Price showing as admin but not shopper
Post by: cas on June 13, 2013, 21:30:26 pm
Over 3 months have gone by and no update from the VM team on this important request for US users!!!  HELP US PLEASE!!!
Title: Re: Base Price showing as admin but not shopper
Post by: spacecadet on June 20, 2013, 14:41:08 pm
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.
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on June 20, 2013, 15:25:12 pm
Are all price options available to display in your productdetails default_showprices.php template? Are you using overrides?
Title: Re: Base Price showing as admin but not shopper
Post by: Milbo on June 22, 2013, 10:44:00 am
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.
Title: Re: Base Price showing as admin but not shopper
Post by: mimirmike on June 25, 2013, 18:15:22 pm
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.
Title: Re: Base Price showing as admin but not shopper
Post by: spacecadet on June 27, 2013, 13:42:18 pm
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.
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on June 27, 2013, 15:04:17 pm
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.
Title: Re: Base Price showing as admin but not shopper
Post by: XenoGen on July 09, 2013, 19:45:10 pm
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. :)
Title: Re: Base Price showing as admin but not shopper
Post by: cas on July 09, 2013, 20:01:02 pm
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


Title: Re: Base Price showing as admin but not shopper
Post by: serpento99 on August 05, 2013, 23:12:22 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>

(http://img19.imageshack.us/img19/5519/vt3p.jpg)

Again, THANK YOU XENOGEN!
Title: Re: Base Price showing as admin but not shopper
Post by: cas on August 10, 2013, 05:06:14 am
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.
Title: Re: Base Price showing as admin but not shopper
Post by: spacecadet on August 16, 2013, 09:34:13 am
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...
Title: Re: Base Price showing as admin but not shopper
Post by: Brody on September 11, 2013, 19:29:23 pm
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...
Title: Re: Base Price showing as admin but not shopper
Post by: Maxim Pishnyak on September 12, 2013, 17:26:20 pm
Isn't using base price forbidden currently? Did you check recent threads about base price destiny?
Title: Re: Base Price showing as admin but not shopper
Post by: Brody on September 12, 2013, 18:40:38 pm
No I just stumbled across my thread that I started last year and noticed there was lots of activity. I am still eager to find a way to show MSRP and OUR Price. I know I can change the language file, but the problem is, the only "other prices" that show up post UNDER the price I want to offer the product at, not above it. It looks silly to have the order of prices that way.

If you know of what the future holds for pricing layouts I would be happy to hear.
Title: Re: Base Price showing as admin but not shopper
Post by: Maxim Pishnyak on September 15, 2013, 12:30:29 pm
You can reorder prices in the template overrides.
Title: Re: Base Price showing as admin but not shopper
Post by: spacecadet on September 23, 2013, 10:49:38 am
ok, something has changed for me now....the price that is displayed on the product page is now the final discounted price.

previously, it would only display the final salesprice.

i guess that upgrading to 2.0.22c has brought this change.

but still, no matter what combination of buttons i click on "show following prices" in configuration, it makes absolutely no difference to the price displayed. whether i click all of the buttons, or some of them, or none of them, it does the same thing: displays the final discounted price.

any suggestions anyone can offer on what i might be doing wrong here would be very much appreciated.

what i would like to happen is to display the base price, and then the discounted price.

any help much appreciated

thanks.

j2.5.14 vm 2.0.22c
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on September 23, 2013, 13:11:33 pm
Check the default_showprices.php template file. You may be using an incorrect template override.
Title: Re: Base Price showing as admin but not shopper
Post by: spacecadet on September 26, 2013, 16:57:23 pm
Thanks for your reply.

I turned off the template....and still the same....cannot get any different configuration of prices to display

When you say "check" the default_showprices.php template file, i'm not quite sure what i should be checking for.

How could I tell if I was using an incorrect template override please?

vm2.0.22c j2.5.14

Thanks
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on September 27, 2013, 10:47:31 am
The default price display template is components/com_virtuemart/views/productdetails/tmpl/default_showprices.php

If you have an override it will be in  templates/yourjoomlatemplate/html/productdetails/  and probably will also be named default_showprices.php

Compare the two.
Title: Re: Base Price showing as admin but not shopper
Post by: spacecadet on October 09, 2013, 14:53:23 pm
In this current thread, on the previous page, the solution which is being presented for the problem discussed here, is that in the file

components/com_virtuemart/views/productdetails/tmpl/default_showprices.php

one should look around line 164 and there one finds the code:

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 );   
            }

ok, well, for me, when i go to that file, I find that the file is only 58 lines long....and around line 32 I find the following string

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);
      }


clearly the first part of the string corresponds to the target string, but then it differs

i cannot find any string in this file which corresponds to the one which we are supposed to replace....

???

has the file changed since the above post was written? does it now need to be rewritten? or should it be working correctly now?

in regards to my problem, this may or may not be the answer. I've realised now after rereading this thread carefully that these discounts we want to show up are entered in to the Override section of the product, rather than the Taxes and Calculations Rulings section. but i still havent got prices to display how i want them. so first i need to sort out this issue with the default_showprices.php file as per the above. once i understand what that file is supposed to look like, whether it needs the code change, and if so, where that needs to go, then i should be able to figure out the rest. i hope.

thanks..

VM2.0.24
JM 2.5.14



Title: Re: Base Price showing as admin but not shopper
Post by: cas on October 09, 2013, 20:21:21 pm
Rather than all of us having to hack the code, why doesn't the VM team simply do what we have all been asking for...  Just have an admin option to display Base Price on the front end.  If you are in a country that should not show the base price, then turn it off, and if you are in the US then turn it on.  Problem solved!
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on October 09, 2013, 23:58:58 pm
My biggest client shifts hundreds of thousands pounds worth of furniture a year through their intranet. They use the base price as it is meant to be used - for the price thay pay to their own supplier, ie their cost price. Then they add different profit margins for their various shopper groups to get the selling price and than apply tax. That is all they want to show, price to their customer & Tax. No way do they want their cost price to be shown.

For another client who has a flexible profit margin their selling price is shown as Salesprice without tax (ie their basic price) which is obtained/calculated by entering the selling (final) price at which they want to sell the product and working backwards, deducting tax. They then show that base (for them) price, the tax amount and the final price. They do check the calculated base price just to ensure that it is more than their actual cost price.

Nothing tricky about these two at all. But Milbo has mentioned the possibility of adding the ability to show the cost price (the current base price) in 2.2. Now I don't know about you, but I don't think my clients ever want to display their cost price as it discloses their profit margin!
Title: Re: Base Price showing as admin but not shopper
Post by: cas on October 10, 2013, 03:47:06 am
Hi Kelvyn,

I agree there are lots of situations when you would not want to display the Base Price, but as you can see from this post, there are lots of folks who do want to display it, so that's why having an on/off option in the admin, solves the problem for everyone.  Folks can turn it on or off as they wish. 

As far as which price to display on the frontend (base price, cost price, etc), just make all the prices optional to display via the admin, and let each of us set the admin settings based on our needs.   Set us free to choose.  Thanks for your help.

Cheers,
Chuck
Title: Re: Base Price showing as admin but not shopper
Post by: Ixelink on October 28, 2013, 23:48:49 pm
And not being in the USA, I only just want to display the normal customers price, WITH the tax. And then, after calculation of more of them, the total tax price and the TOTAL sum (with tax). In the Netherlands that is normal for customers.
But the normal customers price will not appear, the only one that will show is the price WITHOUT tax! But customers don't use that here.

Chainsaw: € 85,00   quantity: 2    Tax (21%): € 29,50   Total: € 170,00

Why is the default way of working for Virtuemart not sufficient?

Regards,
Maarten
Title: Re: Base Price showing as admin but not shopper
Post by: Vicky on January 29, 2014, 06:41:21 am
Hey Guys,
Got solutions for this.
Here you go.

Find this file "components\com_virtuemart\views\productdetails\tmpl\default_showprices.php"
add this code where ever you want
echo "Base Price". $this->product->prices['basePrice'];

Cheers,
VickY  :o
Title: Re: Base Price showing as admin but not shopper
Post by: spacecadet on February 03, 2014, 08:28:20 am
Thanks for that suggestion.

However, it made no difference for me.

I've been trying to make this work for over 6 months now. Over multiple threads. Tried everything. Read everything. Checked everything.

All I want to do is display the normal price, whatever you want to call it, and this month's special discount price.

Like this:

Shampoo: Normal price $14
                 Special Price this month $7

That's it. That's all I want to do.

I set the discount in the Taxes and Discounts area. It works fine. But no matter what combination of prices to display I use, I only ever get the final price, the discounted price. I try to achieve the same effect using the override function in the product itself. Again, this works: it displays the correct final discounted price. but again, no matter what combination of prices I select to appear in the the Configuration/Pricing tab, only the final correct discounted price ever displays.

I am not using a template override for the default show prices.php files.

It may be that i am overlooking something blindingly obvious. It may be that i am doing something wrong. It may be that Virtuemart is not capable of displaying two prices like that, with a line through the first one, indicating that there is a special discount promotion in effect.

Whichever it is, I would really appreciate if someone was able to assist me in thoroughly getting to the bottom of it. Whatever it takes.

Thank you.
Title: Re: Base Price showing as admin but not shopper
Post by: hoknight on February 07, 2014, 10:40:03 am
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. :)


Finally,we did it! Thanks to XenoGen help!

[attachment cleanup by admin]
Title: Re: Base Price showing as admin but not shopper
Post by: jenkinhill on February 07, 2014, 10:55:12 am
See http://forum.virtuemart.net/index.php?topic=121993.0
Title: Re: Base Price showing as admin but not shopper
Post by: aldan on February 25, 2014, 07:33:13 am
all nice and dandy... now what is the file and the code change (please...) that would allow me to put the "base price" in the category blog also?

thanks
alex