Two prices display for logged in members.

  • Posts: 6
  • Thank you received: 0
11 years 10 months ago #84443

For the public, only the public price is displaying. This is good. For members who are logged in, BOTH the public and member prices are displaying. I want members to see only member discount price. When they add the item to the cart, it is using the correct price, but I don't want the public price to display on my items. Please help!

Attachments:

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 10 months ago #84447

Hi,

There is in HikaShop an option which allow you to select the price display method.
System > Configuration > Display > Default parameters for products > Price display method.
You should select "Cheapest price" not, all.

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: 6
  • Thank you received: 0
11 years 10 months ago #84565

My configuration is already set to 'cheapest price'. Is there a different reason two prices would be displaying??

Thanks.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #84899

Hi,

Can you try to add this code in the view "product / listing_price" in HikaShop > Display > Views:

?>
<script>
	var spans = document.getElementsByTagName("span");
	for (var i = 0; i < <?php echo $i; ?>; i++) {
		alert('hikashop_product_price_'+i);
	    if (spans[i].className == 'hikashop_product_price_'+i) {
	        spans[i].style.display = 'none';
	    }
	}
</script>
<?php

Just before "echo JText::_('PRICE_END');"

PS: I don't tried this code.

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

  • Posts: 6
  • Thank you received: 0
11 years 10 months ago #85101

Hi,

I added the code you specified in the file com_hikashop/views/product/tmpl/listing_price.php





It brought up a dialog box to which I had to click on many times:




And at the end, two prices still displayed.

Other suggestions?

Attachments:

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 10 months ago #85131

Hi,

First, please do not write directly in HikaShop files and use view overrides.
You wouldn't be able to update HikaShop without loosing your modification otherwise.

You can use some code to display only the last (or the first) price.
Just use this code in the begin of the listing_price view.

<?php
$class ='';
if(!empty($this->row->prices) && count($this->row->prices)>1){
	// Display several prices
	// $class = ' hikashop_product_several_prices';

	// Display the last one
	$this->row->prices = array( end($this->row->prices) );

	// Display the first one
	// $this->row->prices = array( reset($this->row->prices) );
} ?>

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.
The following user(s) said Thank You: dschafer

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

Time to create page: 0.092 seconds
Powered by Kunena Forum