[Skip to main content](#vessel-content)

#   Text "SKU: "prior to product code

##

- **[karenann](/forum/user/26718-karenann "View karenann's Profile")**
- [![karenann's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/26718-karenann "View karenann's Profile") Topic Author
- [ Offline](/forum/user/26718-karenann)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago [\#131134](#131134) by [karenann](/forum/user/26718-karenann "View karenann's Profile")  *[Text "SKU: "prior to product code](/forum/26-product-category-display/863397-text-sku-prior-to-product-code#131134 "-- 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 &quot;SKU: &quot; How would i do this? Thanks!")* was created by *[karenann](/forum/user/26718-karenann "View karenann's Profile")*

-- 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!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjMzOTctdGV4dC1za3UtcHJpb3ItdG8tcHJvZHVjdC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 11 months ago [\#131158](#131158) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Text "SKU: "prior to product code](/forum/26-product-category-display/863397-text-sku-prior-to-product-code#131158 "-- 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 &quot;SKU: &quot; How would i do this? Thanks!")*

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-&gt;Display-&gt;Views*", and replace these lines : Code:

&lt;span id="hikashop_product_code_main" class="hikashop_product_code_main"&gt; &lt;?php echo $this-&gt;element-&gt;product_code; ?&gt; &lt;/span&gt;

By : Code:

&lt;span id="hikashop_product_code_main" class="hikashop_product_code_main"&gt; &lt;?php echo 'SKU:'.$this-&gt;element-&gt;product_code; ?&gt; &lt;/span&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjMzOTctdGV4dC1za3UtcHJpb3ItdG8tcHJvZHVjdC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[karenann](/forum/user/26718-karenann "View karenann's Profile")**
- [![karenann's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/26718-karenann "View karenann's Profile") Topic Author
- [ Offline](/forum/user/26718-karenann)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago [\#132240](#132240) by [karenann](/forum/user/26718-karenann "View karenann's Profile")  Replied by *[karenann](/forum/user/26718-karenann "View karenann's Profile")* on topic *[Text "SKU: "prior to product code](/forum/26-product-category-display/863397-text-sku-prior-to-product-code#132240 "-- 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 &quot;SKU: &quot; How would i do this? Thanks!")*

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!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjMzOTctdGV4dC1za3UtcHJpb3ItdG8tcHJvZHVjdC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 11 months ago [\#132359](#132359) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Text "SKU: "prior to product code](/forum/26-product-category-display/863397-text-sku-prior-to-product-code#132359 "-- 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 &quot;SKU: &quot; How would i do this? Thanks!")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjMzOTctdGV4dC1za3UtcHJpb3ItdG8tcHJvZHVjdC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Holmes-Pierce](/forum/user/31881-holmes-pierce "View Holmes-Pierce's Profile")**
- [![Holmes-Pierce's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31881-holmes-pierce "View Holmes-Pierce's Profile")
- [ Offline](/forum/user/31881-holmes-pierce)

Less More

- Posts: 265
- Thank you received: 1
-
-

11 years 11 months ago [\#180965](#180965) by [Holmes-Pierce](/forum/user/31881-holmes-pierce "View Holmes-Pierce's Profile")  Replied by *[Holmes-Pierce](/forum/user/31881-holmes-pierce "View Holmes-Pierce's Profile")* on topic *[Text "SKU: "prior to product code](/forum/26-product-category-display/863397-text-sku-prior-to-product-code#180965 "-- 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 &quot;SKU: &quot; How would i do this? Thanks!")*

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjMzOTctdGV4dC1za3UtcHJpb3ItdG8tcHJvZHVjdC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 11 months ago [\#180967](#180967) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Text "SKU: "prior to product code](/forum/26-product-category-display/863397-text-sku-prior-to-product-code#180967 "-- 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 &quot;SKU: &quot; How would i do this? Thanks!")*

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: Code:

if(JRequest::getCmd('layout') == 'show') echo $this-&gt;element-&gt;product_code;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NjMzOTctdGV4dC1za3UtcHJpb3ItdG8tcHJvZHVjdC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.314 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
