product / listing_price.php - show modification only on product detail page

  • Posts: 103
  • Thank you received: 5
5 years 3 months ago #302019

-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.2

how can i show modifications what i have done on the "product / listing_price.php" file only on the product detail page. right now, see the image from the product list view, it does show on both - detail and list views.

Attachments:
Last edit: 5 years 3 months ago by n00bster.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 3 months ago #302045

Hi,

You can use a check like that for example:

if(!empty($this->element->product_id)) {
 // code run only on the product page
}

The following user(s) said Thank You: n00bster

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

  • Posts: 103
  • Thank you received: 5
5 years 3 months ago #302778

how would this check look like in the other way around.

i want do display my custom output in the "listings_price.php" file only on the product listings.

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
5 years 2 months ago #302803

Hi,

Just remove the ! in the code I gave and it will work the other way around.

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

Time to create page: 0.078 seconds
Powered by Kunena Forum