- Posts: 11
- Thank you received: 0
Text "SKU: "prior to product code
12 years 10 months ago #131134
by karenann
Text "SKU: "prior to product code was created by karenann
-- HikaShop version -- : 2.2.2 Essential
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- :
Current i have the following settings in: System - Configuration - Display, Default parameters for products
Display product code: Yes
In the product display I would like to prefix the product code with "SKU: "
How would i do this? Thanks!
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.27
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- :
Current i have the following settings in: System - Configuration - Display, Default parameters for products
Display product code: Yes
In the product display I would like to prefix the product code with "SKU: "
How would i do this? Thanks!
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 10 months ago #131158
by Mohamed Thelji
Replied by Mohamed Thelji on topic Text "SKU: "prior to product code
Hi,
You'll probably be able to do it by editing the code of the "show_default" file of the "product" view of your front-end template through "Hikashop->Display->Views", and replace these lines :
By :
You'll probably be able to do it by editing the code of the "show_default" file of the "product" view of your front-end template through "Hikashop->Display->Views", and replace these lines :
Code:
<span id="hikashop_product_code_main" class="hikashop_product_code_main">
<?php
echo $this->element->product_code;
?>
</span>
Code:
<span id="hikashop_product_code_main" class="hikashop_product_code_main">
<?php
echo 'SKU:'.$this->element->product_code;
?>
</span>
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132240
by karenann
Replied by karenann on topic Text "SKU: "prior to product code
Hi Mohamad, thank you for your reply.
Your suggestion gave me the "SKU:" in the detailed product display. Where I really want to put "SKU:" is in the category listing of the products. i.e. when customer selects a category, they see a listing of products.
What Display View would that be?
Thans so much!
Your suggestion gave me the "SKU:" in the detailed product display. Where I really want to put "SKU:" is in the category listing of the products. i.e. when customer selects a category, they see a listing of products.
What Display View would that be?
Thans so much!
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 10 months ago #132359
by Mohamed Thelji
Replied by Mohamed Thelji on topic Text "SKU: "prior to product code
Ok, Can you show me a screenshot and a link of where you exactly want to add it, so that I can tell you which file you'll have edit ?
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 265
- Thank you received: 1
11 years 10 months ago #180965
by Holmes-Pierce
Replied by Holmes-Pierce on topic Text "SKU: "prior to product code
Sorry to jump on an old thread. I just want to display the code within the product page, but not on category display... I have made the changes and it comes up in both the category and product displays...
I can't find an option within the menu options to prevent this happening.
Thanks,
Hal
I can't find an option within the menu options to prevent this happening.
Thanks,
Hal
Please Log in or Create an account to join the conversation.
11 years 10 months ago #180967
by Xavier
Replied by Xavier on topic Text "SKU: "prior to product code
Hi,
You can disable the display of the product code in the settings of the associated module of the category listing menu.
Or if you have added some code to the view to display the product code, you can use a PHP if condition to restrict the display.
For example the following code allow to display content only on product page and not in listing:
You can disable the display of the product code in the settings of the associated module of the category listing menu.
Or if you have added some code to the view to display the product code, you can use a PHP if condition to restrict the display.
For example the following code allow to display content only on product page and not in listing:
Code:
if(JRequest::getCmd('layout') == 'show')
echo $this->element->product_code;
Please Log in or Create an account to join the conversation.
Time to create page: 0.220 seconds