Jump to content

Hiding attribute modifiers

- - - - -

  • Please log in to reply
No replies to this topic

#1
prodigyru

prodigyru

    Newbie

  • Members
  • Pip
  • 1 posts
Hi All!

I am not a programmer and I thought some of you may help me with this stuff.

In the pinnacle cart Administration area, when you add a new product, you can add product attributes. However, on the product page these attributes will show in parenthesis, following attribute name. For example: If I had dry dog food bags of 3 different sizes, I would set up attributes "Small", "Medium" and "Large". I would also add attribute values, which will increase the price and weight accordingly. Medium (+11,+10), which will then show on the product page like this: (See attachment)



So here is the question:

How can i Hide attribute modifiers (those numbers in parenthesis) for Radio Buttons ?

I found a guide on how to Hide Attribute Modifiers for Drop Down List box, but NOT RADIO BUTTONS:

Hiding attribute modifiers
To hide your attribute modifiers, open up your product_style#.html in /content/skins/skinname where skinname is the name of your active skin.

Once you open up the file, look for the following code and note the comments highlighted in yellow:
{**Attributes Start**}
{if !empty($product.attributes)}
{foreach from=$product.attributes item=attribute}
<div style="padding-bottom:10px;" class="boxText">
{$attribute.caption|htmlspecialchars}:<br />
{if $attribute.attribute_type == "select"}
<select id="attribute_input_{$attribute.paid}" style="width:100%" name="oa_attributes[{$attribute.paid}]" class="ProductAttributesSelect" onChange="calcAttrPrice()">
{foreach from=$attribute.options item=option}
<!-- <option value="{$option.name|urlencode}">
{$option.name}
{if $attribute.is_modifier == "Yes"}- {$option.price|price} {if $ShippingShowWeight == "YES" && $option.weight > 0}- {$option.weight|weight}{/if}{/if}
</option> -->
<option value="{$option.name|urlencode}">
{$option.name}
{if $attribute.is_modifier == "Yes"}{$option.modifier}{/if}
</option>
{/foreach}
</select>

Remove the highlighted comments so that your code looks like the chunk below:

{**Attributes Start**}
{if !empty($product.attributes)}
{foreach from=$product.attributes item=attribute}
<div style="padding-bottom:10px;" class="boxText">
{$attribute.caption|htmlspecialchars}:<br />
{if $attribute.attribute_type == "select"}
<select id="attribute_input_{$attribute.paid}" style="width:100%" name="oa_attributes[{$attribute.paid}]" class="ProductAttributesSelect" onChange="calcAttrPrice()">
{foreach from=$attribute.options item=option}
<option value="{$option.name|urlencode}">
{$option.name}
{if $attribute.is_modifier == "Yes"}- {$option.price|price} {if $ShippingShowWeight == "YES" && $option.weight > 0}- {$option.weight|weight}{/if}{/if}
</option>
<option value="{$option.name|urlencode}">
{$option.name}
{if $attribute.is_modifier == "Yes"}{$option.modifier}{/if}
</option>
{/foreach}
</select>

Next, add comments around the second call to display the attributes:
{**Attributes Start**}
{if !empty($product.attributes)}
{foreach from=$product.attributes item=attribute}
<div style="padding-bottom:10px;" class="boxText">
{$attribute.caption|htmlspecialchars}:<br />
{if $attribute.attribute_type == "select"}
<select id="attribute_input_{$attribute.paid}" style="width:100%" name="oa_attributes[{$attribute.paid}]" class="ProductAttributesSelect" onChange="calcAttrPrice()">
{foreach from=$attribute.options item=option}
<option value="{$option.name|urlencode}">
{$option.name}
{if $attribute.is_modifier == "Yes"}- {$option.price|price} {if $ShippingShowWeight == "YES" && $option.weight > 0}- {$option.weight|weight}{/if}{/if}
</option>
<!--<option value="{$option.name|urlencode}">
{$option.name}
{if $attribute.is_modifier == "Yes"}{$option.modifier}{/if}
</option> -->
{/foreach}
</select>

Then add comments around the if statement in the first portion of code that calls the attributes:
{**Attributes Start**}
{if !empty($product.attributes)}
{foreach from=$product.attributes item=attribute}
<div style="padding-bottom:10px;" class="boxText">
{$attribute.caption|htmlspecialchars}:<br />
{if $attribute.attribute_type == "select"}
<select id="attribute_input_{$attribute.paid}" style="width:100%" name="oa_attributes[{$attribute.paid}]" class="ProductAttributesSelect" onChange="calcAttrPrice()">
{foreach from=$attribute.options item=option}
<option value="{$option.name|urlencode}">
{$option.name}
<!-- {if $attribute.is_modifier == "Yes"}- {$option.price|price} {if $ShippingShowWeight == "YES" && $option.weight > 0}- {$option.weight|weight}{/if}{/if}-->
</option>
<!--<option value="{$option.name|urlencode}">
{$option.name}
{if $attribute.is_modifier == "Yes"}{$option.modifier}{/if}
</option> -->
{/foreach}
</select>

After you make these changes, save the file and then navigate to a product with modifiers to check the results. Make sure the product_style file you edited matches the product style you have active, which by default is product style one.

Thanks In Advance!

Attached Files






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users