Price From for Products with Characteristics

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
11 years 4 months ago #111920

I have added the following to a site I am working on

<?php if(!empty($this->element->product_id)) echo 'Price from'; ?>

However once the product characteristic has been selected I would rather it just diplayed Price: £15.00 each. Can this be achieved please?

Dave B)

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #111923

Hi Dave,

I think that the best solution would be to do it through the "show_default" file, by replacing these lines :

if ($this->params->get('show_price')) {
      $this->row = & $this->element;
      $this->setLayout('listing_price');
      echo $this->loadTemplate();
    }
by :
if ($this->params->get('show_price')) {
      $this->row = & $this->element;
     echo 'Price from';
      $this->setLayout('listing_price');
      echo $this->loadTemplate();

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
11 years 4 months ago #111934

Mohamed

thanks for the solution. The price from part is not on the same line as the price itself.

Dave B)

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #111939

Ok, so the solution will probably be to use some CSS code like :

.hikashop_product_price_full {
display: inline-block !important;
}
Also If you want it to show just for product which have variants, you'll have to replace the line :
echo 'Price from';
by :
if($this->element->product_type == 'variant')
       echo "price from";

The following user(s) said Thank You: davec

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

Time to create page: 0.066 seconds
Powered by Kunena Forum