- Posts: 8
- Thank you received: 0
Hide "common price" on product details listing
- redhookcreative
-
Topic Author
- Offline
Please Log in or Create an account to join the conversation.
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.
- redhookcreative
-
Topic Author
- Offline
- Posts: 8
- Thank you received: 0
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
- Posts: 7
- Thank you received: 0
Please Log in or Create an account to join the conversation.
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
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.
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
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.
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 :
=>
Hope this will fit your needs.
Regards
Please Log in or Create an account to join the conversation.
- Posts: 26
- Thank you received: 1
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.
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
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.
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.
Please Log in or Create an account to join the conversation.
- Posts: 26
- Thank you received: 1
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.
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
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.