Hide "common price" on product details listing

  • Posts: 8
  • Thank you received: 0
7 years 3 weeks ago #266012

I recently updated a client's site to HikaShop Business 3.0.1. Now on a product details page there is Common price: $xx.xx Our price: $xx.xx each. How do I hide or remove the "common price: $xx.xx"?

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
7 years 3 weeks ago #266013

Hi,

You can add such CSS to hide it:
.hikashop_product_msrp_price{ display:none; }

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
7 years 3 weeks ago #266039

Thank you, Please put in a request to add an option in the HikaShop Configuration settings such that the administrators can turn this feature on our off. It is not a good thing that the code must be altered.

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
7 years 2 weeks ago #266050

Hi,

There is no need for such option.
If you don't enter a retail price in the product, then it won't display.
The only purpose of that field is to display what you enter in it as retail price on the product page of the frontend.
If you don't want to display a retail price on the product page, then why do you enter it in the product in the first place ?

Please Log in or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 2
  • Hikashop Essential
6 years 9 months ago #272423

Where would you add that css to hide the common/ retail price?

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 9 months ago #272429

Hi,

You can follow our "customize the display" documentation which explains where to add your custom CSS:
www.hikashop.com/support/documentation/1...ize-the-display.html
It also explains how to find the class that you want to use in your custom CSS.
In your case, you'll want to use hikashop_product_msrp_price

Please Log in or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 2
  • Hikashop Essential
6 years 9 months ago #272514

Ok, great. Thanks for your help.

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
  • Hikashop Business
6 years 2 months ago #286623

Is there a way to make it default not to show common price or our price for each product? This is far more complex than it should be -- for non-technical users, there should be an option to click a check box to have this appear or not appear!!!!!!!!

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 2 months ago #286625

Hi,

The retail price's one and only function is to be displayed on the product page.
If you don't want it on the product page, then don't enter it in the product.
That's why there is no checkbox to display it or not:
www.hikashop.com/forum/product-category-...-listing.html#266050
So far, no one could explain to us why it would be useful to have a retail price in a product and not display it on the product page.
So we still don't see any reason why we should add an option for that.
Could you provide more information on that ?

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
  • Hikashop Business
6 years 2 months ago #286708

We publish business-to-business information. It has a price, but that's neither a "retail price" nor a "common price" - by the way, I've never before heard the term common price!

So while we might want Price to show, we would NEVER want either retail price or common price to show on our website pages.

Likewise, for products with variants, the feature you're providing for "retail price" and "common price" only lists one price, rather than the pricing for each variant option.

I hope that helps to explain why we'd never want to show the fields you've created as defaults in the way you've set them up.

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 2 months ago #286713

Hi,

The terms "common price" and "our price" that are displayed by default next to the prices on the product page are just the default texts that you can easily change with translation overrides in order to suits your needs:
www.hikashop.com/download/languages.html#modify

And regarding the variants, I've made a test but with a retail price for each variant and the variants displayed as a list on the product page, you clearly see the pricing for each variant:
monosnap.com/file/jWMBLMf5qVkcxD8jTGLDpMXwlxughK
So I'm not sure what you're talking about.

And that still doesn't explain why you would want a setting to not display the retail price on the product page instead of just not entering the retail price in the product in the first place ?

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
5 years 9 months ago #294987

Hi Nicolas,
You wrote:
"So far, no one could explain to us why it would be useful to have a retail price in a product and not display it on the product page.
So we still don't see any reason why we should add an option for that.
Could you provide more information on that ? "

Well, I can give you a good reason: we sell at retail prices! Except for a group of logged-in customers who have a lower price.
As soon as those customer are logged in, it's OK. The see: Common price: 8,95 € Your price 7.40 €.
But before logging in, AND the other, 'regular' customers, see: Common price: 8,95 € Your price 8,95 € !
That's a bit silly and suggests they do not get the best deal.
So IMHO there should be ab option, or even always, hide it when the prices are equal.

Please Log in or Create an account to join the conversation.

  • Posts: 4502
  • Thank you received: 610
  • MODERATOR
5 years 9 months ago #295114

Hello,

With your explanation, we can understand your point, now you have to understand that HikaShop have to work for most common case, and of course that don't mean add any option that our customer request.
Because that will lead to complicated configuration, and difficulties on our side from a non-optimized code.

Now, I can give you 2 solutions :
- Use Css to remove Common price, but for all product and any case
- Or create an override view of Listing_div (or listing_list), as :
=>

if ($common_price == $your_price) {
    // Only display your price :
    echo $your_price;
}
else {
   echo $common_price;
   echo $your_price;
}

Hope this will fit your needs.
Regards

Last edit: 5 years 9 months ago by Philip.
The following user(s) said Thank You: ericdewaal

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
5 years 8 months ago #296656

Hello Philipe,

It took some time, but now I tried to apply your second suggestion.
But I cannot find the view file for the override. None of them seems to have the variables $your_price or $common_price.
For example, nothing in products/listing_div.

Please indicate where I can apply the changes, thanks a lot in advance!

Eric

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
5 years 8 months ago #296659

Hi,

That was just an example and you can't just use that code like that.

And regarding your example, it doesn't match with the subject which was about having an option to always display/hide the retail price. In your case you only want to hide it in some cases, and thus it requires some special coding.
Well, actually, automatically hiding the retail price when equal to the product price makes sense.
To do that is actually quite easy. Edit the file listing_price of the view product via the menu Display>Views and replace the code:
@$this->row->product_msrp > 0.0
by:
@$this->row->product_msrp > $price->price_value_with_tax
Note that you need to do that at 2 different places in that file.

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
5 years 8 months ago #296666

Hi,

The string @$this->row->product_msrp > 0.0 actually occurs 3 times: in lines 16, 18 and 50.
After replacing them with @$this->row->product_msrp > $price->price_value_with_tax, the product details still show both prices!
How can I solve this?

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
5 years 8 months ago #296668

Hello,

I'm sorry but Nicolas code was not correct ; unfortunately, the patch is more complicated since the display of the MSRP price is made before the loop on the prices.
We can see to add your request in the TODO list but I'm afraid that we won't be able to give you a "little patch" for it, it would require more code and would impact more than one single line.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
5 years 8 months ago #296693

Hi Jerome,

I see, well, please put it on the TODO list and hopefully it will be included in a future update!
Thanks in advance.

Best regards,
Eric

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
5 years 8 months ago #296696

How about doing it this way.

While in product go down the page to pricing area. Leave retail price blank. The line below the retail price you can click the + button on the right allowing you to add pricing and restrictions.

If I'm thinking correctly, I would do it this way...

1. Create two separate prices in the restrictions area.

2. Under the discounted Price I would check mark "only" the access level that pertains your logged in users who get the discounted price.

3. Under the second non discounted price I would check mark all access levels "except" the access level for your logged in users...

4. Find the right Display view and change the text next to the price with an override to what you want.

So, if they are logged in they see one price, if not logged in see another price. No double pricing.

Just a theory, have not tested. Good luck and let me know if it solved your problem.

Eric

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 1
  • Hikashop Business Hikashop Essential
5 years 8 months ago #296697

Hi,

Obviously this works and we are doing it. But you miss the opportunity of showing:
Regular price: € 8,40 Your price: € 7.95
And that's the whole point of it.
Regards

Please Log in or Create an account to join the conversation.

Time to create page: 0.130 seconds
Powered by Kunena Forum