Author Topic: Base Price showing as admin but not shopper  (Read 27389 times)

caseyd

  • Beginner
  • *
  • Posts: 49
Re: Base Price showing as admin but not shopper
« Reply #15 on: April 09, 2013, 00:39:26 am »
I am also in need of this - how can someone  know what the real price is?

cas

  • Jr. Member
  • **
  • Posts: 487
Re: Base Price showing as admin but not shopper
« Reply #16 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?

cas

  • Jr. Member
  • **
  • Posts: 487
Re: Base Price showing as admin but not shopper
« Reply #17 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!!!

spacecadet

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.26d
Re: Base Price showing as admin but not shopper
« Reply #18 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.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28263
  • Always on vacation
    • Jenkin Hill Internet
Re: Base Price showing as admin but not shopper
« Reply #19 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?
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 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10153
  • VM3.9 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Base Price showing as admin but not shopper
« Reply #20 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.
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

  • Beginner
  • *
  • Posts: 11
Re: Base Price showing as admin but not shopper
« Reply #21 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.

spacecadet

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.26d
Re: Base Price showing as admin but not shopper
« Reply #22 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.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28263
  • Always on vacation
    • Jenkin Hill Internet
Re: Base Price showing as admin but not shopper
« Reply #23 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.
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 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

XenoGen

  • Beginner
  • *
  • Posts: 5
Re: Base Price showing as admin but not shopper
« Reply #24 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. :)

cas

  • Jr. Member
  • **
  • Posts: 487
Re: Base Price showing as admin but not shopper
« Reply #25 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



serpento99

  • Beginner
  • *
  • Posts: 3
Re: Base Price showing as admin but not shopper
« Reply #26 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>



Again, THANK YOU XENOGEN!

cas

  • Jr. Member
  • **
  • Posts: 487
Re: Base Price showing as admin but not shopper
« Reply #27 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.

spacecadet

  • Beginner
  • *
  • Posts: 41
  • VirtueMart Version: 2.0.26d
Re: Base Price showing as admin but not shopper
« Reply #28 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...

Brody

  • Beginner
  • *
  • Posts: 41
Re: Base Price showing as admin but not shopper
« Reply #29 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...