Jump to content

Recommended Posts

Hello, I need to add to the file product.tpl code which, by color, will give me the price of the color. I just write how much color is worth. Please help


my code:

  <ul id="color_to_pick_list" class="clearfix">
                                            {assign var="default_colorpicker" value=""}
                                            {foreach from=$group.attributes key=id_attribute item=group_attribute}
                                            {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
                                            <li {if $group.default==$id_attribute} class="selected" {/if}> <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" meta="$colors.$id_attribute.price|escape:'html':'UTF-8'" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}" {if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};" {/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">

                                                {if $img_color_exists}
                                                <img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" />

                                            {if ($group.default == $id_attribute)}
                                            {$default_colorpicker = $id_attribute}




Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More