Display information from tables

  • Posts: 29
  • Thank you received: 0
11 years 6 months ago #143612

-- HikaShop version -- :2.2.3
-- Joomla version -- :3.2.1
-- PHP version -- : 5.4.6

Hi,

Can you guys please help us how to display information from tables such as show category and variants on product page, and how to display a certain text if the price is lower respective higher than a x value as in the attached image.

Thanks in advance

/Henrik

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #143643

Hi,
1. The solution will be to directly edit the code of the "show_default" file of the "product" view of your front-end template through the page "Hikashop->DIsplay->Views"
2. Adding your tab through your product description can be a solution :).

The following user(s) said Thank You: Marius

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

  • Posts: 29
  • Thank you received: 0
11 years 6 months ago #143660

Hi Mohamed,

Yes, i know which view but not what to write to get/show the information, such as

<span id="hikashop_product_code_main" class="hikashop_product_code_main">
			<?php
      echo "Artikelnr: ".$this->element->product_code;
			?>
		</span>
but i need to show information about category name etc.

/Henrik

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

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #143689

Using this kind of code will probably do the job if your product don't have any variant :

  if($this->element->prices[0]->price_value_with_tax > X){
  echo 'Price greater than X';
  }else{
  echo 'Price lower than X';
  }
Note that if your products have variants, it will be more complicated to do that.

Last edit: 11 years 6 months ago by Mohamed Thelji.

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

Time to create page: 0.065 seconds
Powered by Kunena Forum