How can I hide product code from the front end?

Product codes are handy as reference for our staff. They serve no purpose for our customers that I can think off.



How do I hide product code from the front end store?

Hello!



Please follow skins/YOUR_SKIN/customer/views/products/view.tpl

In view.tpl file change show_sku=true to show_sku=false



Best regards, Alt-team

Many thanks!



How do I remove it from the list view (categories) ?

[attachment=5364:view.jpg]

I renamed the original view.tpl to view_original.tpl.

I changed to [color=#000000]show_sku[/color][color=#666600]=[/color][color=#000088]false. Then uploaded the view.tpl back. But Product codes was not removed.[/color]

[color=#000088]Please check my site www.lootbids.com[/color]

view.jpg

[quote name='meseta' timestamp='1340142812' post='139039']

[attachment=5364:view.jpg]

I renamed the original view.tpl to view_original.tpl.

I changed to [color=#000000]show_sku[/color][color=#666600]=[/color][color=#000088]false. Then uploaded the view.tpl back. But Product codes was not removed.[/color]

[color=#000088]Please check my site www.lootbids.com[/color]

[/quote]



Hi,



Did you clear your cache?



i.e Welcome lootbids.com - BlueHost.com

Thanks, P-Pharma and Alt-team, wanted to modify this a long time ago but forgot until I saw the thread.



Worked for me on our version, and yes, I needed to clear the cache before it appeared correctly in my browser.



Thanks again!

Is there any way to do the same with a profile fields in the customers section ? So we can have a field that appear only in admin and not on the customer details frontend ?

[quote name='apple' timestamp='1340847403' post='139522']

Hi,



Did you clear your cache?



i.e Welcome lootbids.com - BlueHost.com

[/quote]How to clear the cache?

[quote name='meseta' timestamp='1341360820' post='139852'] How to clear the cache? [/quote]



Hello meseta!



As apple indicated you need to add ?сс to your admin page url, it will clear cache, pay attention to apple's example [color=#282828][font=arial, verdana, tahoma, sans-serif] Welcome lootbids.com - BlueHost.com [/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]Best regards, Alt-team[/font][/color]

How do I remove the product code from the list view (categories) ?

There is a simple way to hide the product code for all customer pages.



This works for the basic skin that comes with CS-Cart 3 and should work for all skins that follow this setup.



This involves editing a stylesheet instead of php code or config files



Edit the file located at skins/basic/customer/base.css



Find the class labelled .sku



It should say something like:

.sku {

padding: 0;

font-size: 77%;

}



Add an extra style so it reads like this:

.sku {

padding: 0;

font-size: 77%;

visibility:hidden;

}

[quote name='webhome' timestamp='1352887996' post='149141']

There is a simple way to hide the product code for all customer pages.



This works for the basic skin that comes with CS-Cart 3 and should work for all skins that follow this setup.



This involves editing a stylesheet instead of php code or config files



Edit the file located at skins/basic/customer/base.css



Find the class labelled .sku



It should say something like:

.sku {

padding: 0;

font-size: 77%;

}



Add an extra style so it reads like this:

.sku {

padding: 0;

font-size: 77%;

visibility:hidden;

}

[/quote]



This worked perfectly in 3.0.6 but dosent seem to work in 4.1.2. Anyone know an easy fix to hide SKU on the storefront?

You change show-sku from true to false in views/products/view.tpl



or



add .sku-options-wrapper {visibility:hidden;} to the CSS in your layout.

Thanks for your answer, but i could not get any of those to work. Are you on 4.1.2?



Very strange that the first one didn't work. I cleaned the cache, and deleted all the cache-files in the var/cache-files, but nothing happened.

Yes, I'm on 4.1.2 and both work fine for me.



Do you have the “Rebuild cache automatically” set to On in the File Editor section? I always have that set when I'm doing development work.



Are you definitely changing the correct view.tpl for the theme you're using?

No. I forgot to turn it on. Thanks for the tip. It is on now, and i have once again cleared all the cache from the browser and the server. And still the SKU shows on the storefront.



I was editing the view.tpl in /design/themes/basic/templates/views/products - is that the correct one? I dont have any other templates installed.

Yes.



No idea why neither will work for you. I usually use hooks for changes but I've done it with and without and it works both ways.



Seems to be a lot of people having issues with changes showing up. It's always worked fine for me with no need to delete files from the cache or do manual cache rebuilds.

CS-Cart have been helpful and examined the problem and found out that it was caused by using the Alt-team: Google Rich Snippets add-on. There are templates that overwrites the default CS-Cart templates within this add-on.

Hi P-Pharma,

I have create a add-on for you to help, can be downloaded from [url=“Hide Product Code in the Frontend - Free CS-Cart Add-on by HungryWeb.net”]http://bit.ly/1fC9J5u[/url]

Also can be added with My Changes add-on, [color=#ff0000]please request and i will add instructions.[/color]

Non overrides are used or hidden blocks with css, the add-on only use hooks and will not have any impact on any add-on already installed.



I hope that helps,





Valentin

[color=#808080][size=2]part of hungryweb.net[/size][/color]

Thanks man. Very nice add-on.