Issue with price display on product detail page

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
1 week 2 days ago #319529

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.8.18

I am having an issue with price display on product detail pages. I have a number of products with variants. On the product div the prices display as they should (in a range) see img1.

But when you enter the product display there seems to be a glitch / logic error with how the display works. it shows the price of the default product (selected in the backend). but this is where the logic issue is there is no default because as far as the user is concerned they havent made any selections yet. So what it should do is show the price range like the div or if that isnt possible no price at all until a selection has been made would be better until the selections have been made where it then changes to the price of the selections made.

So im not sure how to achieve this.

1. is there a way to not have the default variant selection in the backend which seems to be the main issue. Personally I think there is an error in the logic here by having to have a default.

2. force it to show the price range until the selections have been made.

3. or least prefered option hide the price until the selections have been made

Any advice on how to achieve this would be appreciated and I would like to request that the logic here is possible looked at for a future version

Kind regards,

martyn

Attachments:

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

  • Posts: 69451
  • Thank you received: 10401
  • MODERATOR
1 week 1 day ago #319558

Hi,

That's because of the "Characteristics dynamic display" setting in the HikaShop configuration.
That's a new option we've only added recently which makes the user have a "please select" in each characteristic selector.
With the option turned off, you'll see that the default variant is preselected in all the characteristic selectors.
And that's why you get the default variant price and why you have to select a variant in the backend.
But yeah, hiding the default price when that option is activated and that variants have different prices indeed makes sense.
Add the code:

<?php if(@$this->displayVariants['prices']) { ?>
	var priceDivs = document.querySelectorAll('#hikashop_product_price_main > .hikashop_product_price_full');
	priceDivs.forEach(function (sub) { sub.style.display = 'none'; });
<?php } ?>

after the code:
if(altArea) {
		altArea.style.display = '';
	}
in the file product / show_block_characteristic.php via the menu Display>Views and it will hide the price area until the variant is selected when that setting is activated and there are different prices in the product.
We'll add that change on our end too.

Thanks for the feedback.

Last edit: 1 week 1 day ago by nicolas.

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

  • Posts: 69451
  • Thank you received: 10401
  • MODERATOR
1 week 1 day ago #319559

Hi,

sorry, code not similar in the release and dev environment... instructions updated in my previous post.

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

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
1 week 1 day ago #319570

Hi Nicolas,

That is great thankyou. I have added the code and it is working.

Can I ask however that in the longer term you consider giving the option for no price or price range until a selection is made. The reason I ask is not having the price showing is fine if you are coming to that page from the product div because the range is there, so the customer has an idea of what the price will be, but if they come to the page from somewhere else (e.g. direct from a search engine) the page gives no indication of price unless a selection is made which may put customers off.

Many thanks

Martyn

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

  • Posts: 69451
  • Thank you received: 10401
  • MODERATOR
1 week 1 day ago #319576

Hi,

Why not just modify the message you have for the add to cart button to say that the price also will appear after you make a selection ?
You can easily do that with a translation override:
www.hikashop.com/download/languages.html#modify

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

  • Posts: 56
  • Thank you received: 0
  • Hikashop Business
1 week 1 day ago #319587

I could yes, but it is normal for a product in a store to show a price be that a range for a product with variants or fixed price for items without. Therefore customers expect to see a price and if information is missing very few will ask, so personally the more elegant option and in line with what customers will expect from experience with the likes of ebay/amazon is it to show a price range until the selections have been made at which point it shows the price of the option choosen.

Again thankyou for your help.

Martyn

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

  • Posts: 69451
  • Thank you received: 10401
  • MODERATOR
1 week 20 hours ago #319610

Hi,

I see what you mean.
Thank you for your feedback. We'll take that into account for future improvements.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum