Change How Product Code/sku Is Displayed

im trying to add sku to the product lists.

i am using this code:


{assign var="sku" value="sku_`$obj_id`"}
{$smarty.capture.$sku nofilter}

which generates:

SKU: #3169

Iron Maiden

[Sign in to view price]

I want to remove the "SKU:" and just have the "#3169" displayed.

i am still learning, getting better. couldnt figure this one out.

thanks!

vinny

im trying to add sku to the product lists.

i am using this code:


{assign var="sku" value="sku_`$obj_id`"}
{$smarty.capture.$sku nofilter}

which generates:

SKU: #3169

Iron Maiden

[Sign in to view price]

I want to remove the "SKU:" and just have the "#3169" displayed.

i am still learning, getting better. couldnt figure this one out.

thanks!

vinny

Hello! You should edit the following file: /design/themes/[your_theme]/templates/common/product_data.tpl

The code that you need:

{capture name="sku_`$obj_id`"}
    {if $show_sku}
        
{__("sku")}: {$product.product_code}
{/if} {/capture}

im trying to add sku to the product lists.

i am using this code:


{assign var="sku" value="sku_`$obj_id`"}
{$smarty.capture.$sku nofilter}

which generates:

SKU: #3169

Iron Maiden

[Sign in to view price]

I want to remove the "SKU:" and just have the "#3169" displayed.

i am still learning, getting better. couldnt figure this one out.

thanks!

vinny

Or you can cretae a file: /design/themes/[your_theme]/templates/addons/my_changes/hooks/products/product_data.post.tpl with the following content:

{capture name="new_sku_`$obj_id`"}
        
{$product.product_code}
{/capture}

And use in your template the following code:

{assign var="new_sku" value="new_sku_`$obj_id`"} {$smarty.capture.$new_sku nofilter}

i thought i needed to edit:

templates / blocks / product_templates / default_template.tpl?

can i remove the big space instead of removing style#?

You can but if you do not want your changes possibly overwritten during upgrades then do it the way beencart explained.

Edit: I just re-read the posts and I suppose it depends on exactly where you are wanting to make your changes.

ahh i understand about the upgrades. after i upgraded i lost all my changes which is why im in this predicament.

i lost the placement of my sku and the placement of my short description as well. ill have to read a bit more.

thanks!!

in fact, even my colors changed for some reason....

http://www.scorpioposters.com/paper-posters/video-games-comics/

the main title of each product is grey while the short desc is black, i cannot figure out what i edited to have the product title black and 18 while the short desc was grey and 16, almost the opposite of what it is now.

any help would be great!!

in fact, even my colors changed for some reason....

http://www.scorpioposters.com/paper-posters/video-games-comics/

the main title of each product is grey while the short desc is black, i cannot figure out what i edited to have the product title black and 18 while the short desc was grey and 16, almost the opposite of what it is now.

any help would be great!!

Hello!

You can use this class to change the product title:

.ty-grid-list__item-name .product-title

for example,

.ty-grid-list__item-name .product-title {
    color: black;
    font-size: 18px;
}

For short description try:

.ty-grid-list__item-name {
    color: grey;
}

To hide SKU label, just add the following code to the CSS section of the Theme editor:

.ty-sku-item .label {
    display: none;
}

It will also remove extra space

thanks guys i figured it out. i edited the /design/themes/[your_theme]/templates/common/product_data.tpl