Tabbed product details mod

Hi dominos_2004



Very cool dominos, but what do you mean when you say,


[quote name=‘zardos’]Hi dominos_2004



Very cool dominos, but what do you mean when you say,[/QUOTE]



Nothing means

Just adding to this thread !



I have integrated this mod but made changes so tabs are only displayed when required I have also set the “selected tab” to change if for instance I want detailed images first for most listings however if a listing has no images then send to friend will display.



[COLOR=red]THIS CODE IS A DIRECT REPLACEMENT FOR “STEP 2” from the original integration methods[/COLOR]


```php








{if $product.product_features}
{include file="products_pages/product_features.tpl"}
{/if}



{include file="addons/related_products/customer_product_details.tpl"}


{if $settings.Modules.customers_also_bought == 'Y'}
{include file="addons/customers_also_bought/product_details.tpl"}
{/if}


{if $product.image_pairs}
{include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
{/if}


{if $settings.Modules.send_to_friend == 'Y'}
{include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product}
{/if}




```

Most of the other customisations I have done where template specific such as changing surrounding
content boxes to match that of "additional images"

Unfortunatly tonight I dont have time to go through this completely but if you need help and are using
default blue theme then let me know !

example of my tabbed products

Showing features & Send to friend
[URL="http://www.car-audio-accessories.co.uk/mutant-mp3-cd-player-with-removable-mp3-player-p50.html"]http://www.car-audio-accessories.co.uk/mutant-mp3-cd-player-with-removable-mp3-player-p50.html[/URL]

Showing features, related, additional images and send to friend.
[URL="http://www.car-audio-accessories.co.uk/mutant-mp3-usb-cd-player-clone-p1734.html"]http://www.car-audio-accessories.co.uk/mutant-mp3-usb-cd-player-clone-p1734.html[/URL]

Notice how using the if statement it will always load with some content

[quote name=‘SWS’]Just adding to this thread !



I have integrated this mod but made changes so tabs are only displayed when required I have also set the “selected tab” to change if for instance I want detailed images first for most listings however if a listing has no images then send to friend will display.


```php







{if $settings.Modules.related_products == 'Y'}
{include file="addons/related_products/customer_product_details.tpl"}
{/if}


{if $settings.Modules.customers_also_bought == 'Y'}
{include file="addons/customers_also_bought/product_details.tpl"}
{/if}


{if $product.image_pairs}
{include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
{/if}


{if $settings.Modules.send_to_friend == 'Y'}
{include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product}
{/if}



```[/QUOTE]


can u put more details into accordingto what we do with this code@! i know this is whati want but.. wher do i place the code is there anything elsei need to place?

Ok, Ive updated my post above… please edit yours and remove the quote as the text will be a mis-match and may cause confusion…

Hello!



I have a store both in English and Spanish. I already added this mod to my store but the names on the tabs are all in English, how can I change this? I mean, I want the tabs to be in Spanish when the store is in Spanish and in English when the store is being viewed in this language. Is there a solution?

Hi mirnitagl



Just change the part in red below to the part in blue on each and make sure it is in your Language variables in admin.




```php

  • [COLOR=Red]Send to a Friend[/COLOR]

  • ```

    ```php
  • [COLOR=Blue]{$lang.Send_to_a_Friend}[/COLOR]

  • ```
    Hope that helps.

    make that:

    {$lang.Send_to_a_Friend}

    ooooooopppps :oops: Thankyou snoocket :oops:

    Zardos… wrong thread I know, noticed you had the thickbox mod…



    I like what you have done on the product list pages, for larger images… nice touch. Looks like you forgot to include the animated loading gif though…

    Hi SWS



    Yes i am not with it just now, have java error in IE and for some reason cannot get the loading gif to load, as i said not with it just now :rolleyes:

    Thank you, Zardos for trying to help me. I appreciate it.



    I do not find the thread you mention here. All I want is to have is the following product details tabbed in this order “additional images” “related products” “reviews” and “send to friend” in the corresponding language.



    Would it be possible to write my tpl file here so anyone can see where the problem is and help me?

    Hi mirnitagl



    Yes post your TPL and we will see what we can do for you.

    I hope it’s not abusive to post this long code here…




    {* $Id: product_details.tpl 2475 2006-11-05 12:25:24Z lantan $ *}

    {capture name="mainbox"}

    {if $smarty.capture.js_loaded != "Y"}

    {capture name="js_loaded"}Y{/capture}
    {/if}















    {include file="common_templates/image.tpl" show_detailed_link="Y" obj_id=$product.product_id images=$product.main_pair object_type="product"}

    {$product.product|escape:html}

    {if $product.product_code}
    {$lang.sku}: {$product.product_code}

    {/if}
    {if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/average_rating.tpl" object_id=$product.product_id object_type='P'}
    {/if}





    {************************************ Discount label ****************************}
    {if $product.discounts && $product.price|floatval && !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}


    {/if}
    {* / Discount label *}


    {******************************* List price, Old Price **************************}
    {if $product.discounts && $product.price|floatval}
    {$lang.old_price}: {include file="common_templates/price.tpl" value=$product.price span_id="original_price_`$product.product_id`" class="list-price"}

    {elseif !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}
    {if $product.list_price > $product.price && $product.price != 0}
    {$lang.list_price}: {include file="common_templates/price.tpl" value=$product.list_price span_id="list_price_`$product.product_id`" class="list-price"}

    {/if}
    {/if}
    {************************ Discounted Price, Our Price, Price ********************}

    {if $product.price != 0 || $product.product_type == 'C' || $product.zero_price_action == 'P'}
    {if $product.discounts && $product.price|floatval}{$lang.discounted_price}
    {include file="common_templates/price.tpl" value=$product.discounted_price span_id="discounted_price_`$product.product_id`"}
    {else}
    {if $product.list_price > $product.price && !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}{$lang.our_price}{else}{$lang.price}{/if}: {include file="common_templates/price.tpl" value=$product.price span_id="original_price_`$product.product_id`"}
    {/if}
    {elseif $product.zero_price_action == 'A'}
    {$lang.enter_your_price}:
    {elseif $product.zero_price_action == 'R'}
    {$lang.contact_us_for_price}
    {/if}


    {if $product.tax != ""}
    ({$lang.including_tax} {include file="common_templates/price.tpl" value=$product.tax})
    {/if}
    {************************************* You Save: *******************************}
    {if $product.discounts && $product.price|floatval}
    {$lang.you_save}: {include file="common_templates/price.tpl" value=$product.discounts.total span_id="save_`$product.product_id`" class="list-price"}

    {elseif !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}
    {if $product.list_price > $product.price && $product.price|floatval}
    {math equation="list_price - price" list_price=$product.list_price price=$product.price assign="absolute_discount"}
    {math equation="100 - ((price / list_price) * 100)" list_price=$product.list_price price=$product.price format="%d" assign="percent_discount"}
    {$lang.you_save}: {include file="common_templates/price.tpl" value=$absolute_discount span_id="save_`$product.product_id`" class="list-price"}({$percent_discount}%)

    {/if}
    {/if}







    {include file="common_templates/modifier.tpl" mod_type="P" mod_value=$product.discount_amount non_zeros='Y' spanm_id="discount_label_`$product.product_id`" class="discount-label-text"}


    {if $wholesale_prices && $product.product_type != 'C' && $settings.Modules.product_configurator == 'Y'}
    {include file="addons/wholesale_trade/customer_product_details.tpl"}
    {/if}



    {include file="products_pages/product_features.tpl"}


    {if $product.product_options}
    {include file="products_pages/product_options.tpl" id=$product.product_id product_options=$product.product_options name="product_data"}
    {/if}


    {if $settings.General.inventory_tracking == 'Y' && $product.tracking != 'D' && $product.is_edp != 'Y'}




    {/if}

    {if !($product.zero_price_action == 'R' && $product.price == 0)}




    {/if}
    {$lang.in_stock}: {$product.amount} {$lang.items}
    {$lang.amount}:
    {if $settings.General.inventory_tracking == 'Y' && $product.amount <= 0 && $product.is_edp != 'Y' && $product.tracking == 'B'}
    {$lang.text_out_of_stock}
    {elseif $product.is_edp == 'Y'}
    1 ({$lang.text_edp_product})


    {else}

    {/if}

    {if !($product.zero_price_action == 'R' && $product.price == 0)}




    {if !($settings.General.inventory_tracking == 'Y' && $product.amount < '1' && $product.is_edp != 'Y' && $product.tracking == 'B')}


    {/if}
    {if $auth.user_id && $settings.Modules.wishlist == 'Y'}


    {/if}
    {if $product.feature_comparison == 'Y'}

    {/if}


    {if $settings.DHTML.ajax_add_to_cart == 'Y'}
    {include file="buttons/add_to_cart.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id`.`$target_name`.value='cart'; fn_http_request('ca', fn_form_get_request('product_details_form_`$product.product_id`') + 'ajax=cart_status'); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {else}
    {include file="buttons/add_to_cart.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id`.`$target_name`.value='cart'; document.product_details_form_`$product.product_id`.submit(); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {/if}

    {if $settings.DHTML.ajax_add_to_cart == 'Y'}
    {include file="addons/wishlist/add_to_wishlist.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id`.`$target_name`.value='wishlist'; fn_http_request('wl', fn_form_get_request('product_details_form_`$product.product_id`') + 'ajax=wish_list'); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {else}
    {include file="addons/wishlist/add_to_wishlist.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id`.`$target_name`.value='wishlist'; document.product_details_form_`$product.product_id`.submit(); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {/if}

    {include file="buttons/add_to_compare_list.tpl" product_id=$product.product_id}

    {/if}


    {if $settings.Modules.customers_also_bought == 'Y' && $customers_also_bought}
    {$lang.customers_also_bought}


    {/if}
    {if $related_products}
    {$lang.related_products}


    {/if}
    {if $settings.Modules.discussion == 'Y'}

    {/if}
    {*{if $settings.Modules.send_to_friend == 'Y'}
    {$lang.send_to_friend}


    {/if}*}




    {*************** configurator ****************}
    {if $settings.Modules.product_configurator == 'Y'}
    {include file="addons/product_configurator/product_configurator_groups.tpl" product_id=$product.product_id product_configurator_groups=$product_configurator_groups}
    {/if}
    {*************** /configurator ****************}





    {$product.full_description|default:$product.short_description}


    {*{if $product.image_pairs}



    {include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
    {/if}*}

    {/capture}
    {include file="common_templates/mainbox.tpl" title=$product.product content=$smarty.capture.mainbox}






    {if $settings.Modules.related_products == 'Y'}
    {include file="addons/related_products/customer_product_details.tpl"}
    {/if}


    {if $settings.Modules.customers_also_bought == 'Y'}
    {include file="addons/customers_also_bought/product_details.tpl"}
    {/if}


    {if $product.image_pairs}
    {include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
    {/if}


    {if $settings.Modules.send_to_friend == 'Y'}
    {include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product}
    {/if}



    {if $settings.Modules.customers_also_bought == 'Y'}
    {include file="addons/customers_also_bought/product_details.tpl"}
    {/if}

    {if $settings.Modules.related_products == 'Y'}
    {include file="addons/related_products/customer_product_details.tpl"}
    {/if}

    {if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/discussion.tpl" object_id=$product.product_id object_type="P" title=$lang.discussion_title_product quicklink="disussion_link"}
    {/if}

    {*{if $settings.Modules.send_to_friend == 'Y'}
    {include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product|escape:html}
    {/if}*}

    THANKS TO ALL IN ADVANCE!

    I beleive this is what your after…



    When pasting in code its probably a good idea to start with [COLOR=red][ code ][/COLOR] and end with [COLOR=red][ /code ][/COLOR]

    without the spaces, this wraps it into a nice selectable area like below.



    I never normally code without testing, but im unable to test this due to my store being live and not having a “dummy store” set up yet.


    ```php



    {* $Id: product_details.tpl 2475 2006-11-05 12:25:24Z lantan $ *}

    {capture name=“mainbox”}

    {if $smarty.capture.js_loaded != “Y”}


    {capture name=“js_loaded”}Y{/capture}

    {/if}














    {include file="common_templates/image.tpl" show_detailed_link="Y" obj_id=$product.product_id images=$product.main_pair object_type="product"}

    {$product.product|escape:html}

    {if $product.product_code}
    {$lang.sku}: {$product. product_code}

    {/if}
    {if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/average_rating.tpl" object_id=$product.product_id object_type='P'}
    {/if}





    {************************************ Discount label ****************************}
    {if $product.discounts && $product.price|floatval && !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}


    {/if}
    {* / Discount label *}


    {******************************* List price, Old Price **************************}
    {if $product.discounts && $product.price|floatval}
    {$lang.old_price}: {include file="common_templates/price.tpl" value=$product.price span_id="original_price_`$product.product_id`" class="list-price"}

    {elseif !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}
    {if $product.list_price > $product.price && $product.price != 0}
    {$lang.list_price}: {include file="common_templates/price.tpl" value=$product.list_price span_id="list_price_`$product.product_id`" class="list-price"}

    {/if}
    {/if}
    {************************ Discounted Price, Our Price, Price ********************}

    {if $product.price != 0 || $product.product_type == 'C' || $product.zero_price_action == 'P'}
    {if $product.discounts && $product.price|floatval}{$lang.discounted_price}
    {include file="common_templates/price.tpl" value=$product.discounted_price span_id="discounted_price_`$product.product_id`"}
    {else}
    {if $product.list_price > $product.price && !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}{$lang.our_price}{else}{$lang.price}{/if}: {include file="common_templates/price.tpl" value=$product.price span_id="original_price_`$product.product_id`"}
    {/if}
    {elseif $product.zero_price_action == 'A'}
    {$lang.enter_your_price}:
    {elseif $product.zero_price_action == 'R'}
    {$lang.contact_us_for_price}
    {/if}

    {if $product.tax != ""}
    ({$lang.including_tax} {include file="common_templates/price.tpl" value=$product.tax})
    {/if}
    {************************************* You Save: *******************************}
    {if $product.discounts && $product.price|floatval}
    {$lang.you_save}: {include file="common_templates/price.tpl" value=$product.discounts.total span_id="save_`$product.product_id`" class="list-price"}

    {elseif !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}
    {if $product.list_price > $product.price && $product.price|floatval}
    {math equation="list_price - price" list_price=$product.list_price price=$product.price assign="absolute_discount"}
    {math equation="100 - ((price / list_price) * 100)" list_price=$product.list_price price=$product.price format="%d" assign="percent_discount"}
    {$lang.you_save}: {include file="common_templates/price.tpl" value=$absolute_discount span_id="save_`$product.product_id`" class="list-price"}({$percent_discount}%)

    {/if}
    {/if}







    {include file="common_templates/modifier.tpl" mod_type="P" mod_value=$product.discount_amount non_zeros='Y' spanm_id="discount_label_`$product.product_id`" class="discount-label-text"}


    {if $wholesale_prices && $product.product_type != 'C' && $settings.Modules.product_configurator == 'Y'}
    {include file="addons/wholesale_trade/customer_product_details.tpl"}
    {/if}


    {include file="products_pages/product_features.tpl"}


    {if $product.product_options}
    {include file="products_pages/product_options.tpl" id=$product.product_id product_options=$product.product_options name="product_data"}
    {/if}

    {if $settings.General.inventory_tracking == 'Y' && $product.tracking != 'D' && $product.is_edp != 'Y'}




    {/if}
    {if !($product.zero_price_action == 'R' && $product.price == 0)}




    {/if}
    {$lang.in_stock}: {$produc t.amount} {$lang.items}
    {$lang.amount}:
    {if $settings.General.inventory_tracking == 'Y' && $product.amount <= 0 && $product.is_edp != 'Y' && $product.tracking == 'B'}
    {$lang.text_out_of_stock}
    {elseif $product.is_edp == 'Y'}
    1 ({$lang.text_edp_product})


    {else}

    {/if}

    {if !($product.zero_price_action == 'R' && $product.price == 0)}




    {if !($settings.General.inventory_tracking == 'Y' && $product.amount < '1' && $product.is_edp != 'Y' && $product.tracking == 'B')}


    {/if}
    {if $auth.user_id && $settings.Modules.wishlist == 'Y'}


    {/if}
    {if $product.feature_comparison == 'Y'}

    {/if}


    {if $settings.DHTML.ajax_add_to_cart == 'Y'}
    {include file="buttons/add_to_cart.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='cart'; fn_http_request('ca', fn_form_get_request('product_details_form_`$produc t.product_id`') + 'ajax=cart_status'); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {else}
    {include file="buttons/add_to_cart.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='cart'; document.product_details_form_`$product.product_id `.submit(); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {/if}

    {if $settings.DHTML.ajax_add_to_cart == 'Y'}
    {include file="addons/wishlist/add_to_wishlist.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='wishlist'; fn_http_request('wl', fn_form_get_request('product_details_form_`$produc t.product_id`') + 'ajax=wish_list'); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {else}
    {include file="addons/wishlist/add_to_wishlist.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='wishlist'; document.product_details_form_`$product.product_id `.submit(); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {/if}

    {include file="buttons/add_to_compare_list.tpl" product_id=$product.product_id}

    {/if}


    {if $settings.Modules.customers_also_bought == 'Y' && $customers_also_bought}
    {$lang.customers_also_bought}


    {/if}
    {if $related_products}
    {$lang.related_products}


    {/if}
    {if $settings.Modules.discussion == 'Y'}

    {/if}
    {*{if $settings.Modules.send_to_friend == 'Y'}
    {$lang.send_to_friend}


    {/if}*}



    {*************** configurator ****************}
    {if $settings.Modules.product_configurator == 'Y'}
    {include file="addons/product_configurator/product_configurator_groups.tpl" product_id=$product.product_id product_configurator_groups=$product_configurator_ groups}
    {/if}
    {*************** /configurator ****************}




    {$product.full_description|default:$product.short_ description}

    {*{if $product.image_pairs}



    {include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
    {/if}*}

    add images
    related
    reveiws
    send to friend
    {/capture}
    {include file="common_templates/mainbox.tpl" title=$product.product content=$smarty.capture.mainbox}


      {if $product.image_pairs}
    • Additional Images

    • {/if}
      {* Below will check if above modules are active and have content otherwise this will be default tab*}
      {if $product.related_products }

    • {$lang.related_products}

    • {/if}
      {* Below will check if above modules are active and have content otherwise this will be default tab*}
      {if $settings.Modules.discussion == 'Y'}

    • {$lang.discussion_title_product}

    • {/if}
      {* Below will check if above modules are active and have content otherwise this will be default tab*}
      {if $settings.Modules.send_to_friend == 'Y'}

    • {$lang.send_to_friend}

    • {/if}
      {* Also purchased is not enabled
      {if $product.customers_also_bought }
    • {$lang.customers_also_bought}

    • {/if}*}






    {if $product.image_pairs}
    {include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
    {/if}


    {if $settings.Modules.related_products == 'Y'}
    {include file="addons/related_products/customer_product_details.tpl"}
    {/if}


    {if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/discussion.tpl" object_id=$product.product_id object_type="P" title=$lang.discussion_title_product quicklink="disussion_link"}
    {/if}


    {if $settings.Modules.send_to_friend == 'Y'}
    {include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product}
    {/if}

    {* this has been left outside of the tabs enabled below still*}

    {if $settings.Modules.customers_also_bought == 'Y'}
    {include file="addons/customers_also_bought/product_details.tpl"}
    {/if}



    {if $settings.Modules.customers_also_bought == 'Y'}
    {include file="addons/customers_also_bought/product_details.tpl"}
    {/if}
    {*if $settings.Modules.related_products == 'Y'}
    {include file="addons/related_products/customer_product_details.tpl"}
    {/if*}
    {*if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/discussion.tpl" object_id=$product.product_id object_type="P" title=$lang.discussion_title_product quicklink="disussion_link"}
    {/if*}
    {*{if $settings.Modules.send_to_friend == 'Y'}
    {include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product|escape:html}
    {/if}*}

    ```

    You will still need to mod some other templates to get it looking like a clean tabbed area though !

    Customers also purchased is not included in this TAB set as you didnt say you wanted it in, it will still appear underneath the tabs

    thanks for replying. I copied the code and tested it, in the product page it gives me this error message:



    Fatal error: Smarty error: [in products_pages/product_details.tpl line 25]: syntax error: unrecognized tag: $product. product_code (Smarty_Compiler.class.php, line 437) in /home/precioe/public_html/art/classes/templater/Smarty.class.php on line 1096

    [quote name=‘mirnitagl’]thanks for replying. I copied the code and tested it, in the product page it gives me this error message:



    Fatal error: Smarty error: [in products_pages/product_details.tpl line 25]: syntax error: unrecognized tag: $product. product_code (Smarty_Compiler.class.php, line 437) in /home/precioe/public_html/art/classes/templater/Smarty.class.php on line 1096[/QUOTE]





    Check the code and fix the space bug caused by vbulletin:



    “{$product. product_code}”



    to



    “{$product.product_code}”

    Thanks. I did as you said, keep having an error, I get this:



    Fatal error: Smarty error: [in products_pages/product_details.tpl line 176]: syntax error: expecting ‘=’ after attribute name ‘groups’ (Smarty_Compiler.class.php, line 1573) in /home/precioe/public_html/art/classes/templater/Smarty.class.php on line 1096

    I found a couple additional blank spaces in that code posted above by SWS



    (no insult intended about your code SWS. I only wanted him to know which one I copied)



    See if this one will now run without error



    ```php

    {* $Id: product_details.tpl 2475 2006-11-05 12:25:24Z lantan $ *}

    {capture name=“mainbox”}

    {if $smarty.capture.js_loaded != “Y”}


    {capture name=“js_loaded”}Y{/capture}

    {/if}














    {include file="common_templates/image.tpl" show_detailed_link="Y" obj_id=$product.product_id images=$product.main_pair object_type="product"}

    {$product.product|escape:html}

    {if $product.product_code}
    {$lang.sku}: {$product.product_code}

    {/if}
    {if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/average_rating.tpl" object_id=$product.product_id object_type='P'}
    {/if}





    {************************************ Discount label ****************************}
    {if $product.discounts && $product.price|floatval && !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}


    {/if}
    {* / Discount label *}


    {******************************* List price, Old Price **************************}
    {if $product.discounts && $product.price|floatval}
    {$lang.old_price}: {include file="common_templates/price.tpl" value=$product.price span_id="original_price_`$product.product_id`" class="list-price"}

    {elseif !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}
    {if $product.list_price > $product.price && $product.price != 0}
    {$lang.list_price}: {include file="common_templates/price.tpl" value=$product.list_price span_id="list_price_`$product.product_id`" class="list-price"}

    {/if}
    {/if}
    {************************ Discounted Price, Our Price, Price ********************}

    {if $product.price != 0 || $product.product_type == 'C' || $product.zero_price_action == 'P'}
    {if $product.discounts && $product.price|floatval}{$lang.discounted_price}
    {include file="common_templates/price.tpl" value=$product.discounted_price span_id="discounted_price_`$product.product_id`"}
    {else}
    {if $product.list_price > $product.price && !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}{$lang.our_price}{else}{$lang.price}{/if}: {include file="common_templates/price.tpl" value=$product.price span_id="original_price_`$product.product_id`"}
    {/if}
    {elseif $product.zero_price_action == 'A'}
    {$lang.enter_your_price}:
    {elseif $product.zero_price_action == 'R'}
    {$lang.contact_us_for_price}
    {/if}

    {if $product.tax != ""}
    ({$lang.including_tax} {include file="common_templates/price.tpl" value=$product.tax})
    {/if}
    {************************************* You Save: *******************************}
    {if $product.discounts && $product.price|floatval}
    {$lang.you_save}: {include file="common_templates/price.tpl" value=$product.discounts.total span_id="save_`$product.product_id`" class="list-price"}

    {elseif !($settings.Modules.product_configurator == 'Y' && $product.product_type == 'C')}
    {if $product.list_price > $product.price && $product.price|floatval}
    {math equation="list_price - price" list_price=$product.list_price price=$product.price assign="absolute_discount"}
    {math equation="100 - ((price / list_price) * 100)" list_price=$product.list_price price=$product.price format="%d" assign="percent_discount"}
    {$lang.you_save}: {include file="common_templates/price.tpl" value=$absolute_discount span_id="save_`$product.product_id`" class="list-price"}({$percent_discount}%)

    {/if}
    {/if}







    {include file="common_templates/modifier.tpl" mod_type="P" mod_value=$product.discount_amount non_zeros='Y' spanm_id="discount_label_`$product.product_id`" class="discount-label-text"}


    {if $wholesale_prices && $product.product_type != 'C' && $settings.Modules.product_configurator == 'Y'}
    {include file="addons/wholesale_trade/customer_product_details.tpl"}
    {/if}


    {include file="products_pages/product_features.tpl"}


    {if $product.product_options}
    {include file="products_pages/product_options.tpl" id=$product.product_id product_options=$product.product_options name="product_data"}
    {/if}

    {if $settings.General.inventory_tracking == 'Y' && $product.tracking != 'D' && $product.is_edp != 'Y'}




    {/if}
    {if !($product.zero_price_action == 'R' && $product.price == 0)}




    {/if}
    {$lang.in_stock}: {$produc t.amount} {$lang.items}
    {$lang.amount}:
    {if $settings.General.inventory_tracking == 'Y' && $product.amount <= 0 && $product.is_edp != 'Y' && $product.tracking == 'B'}
    {$lang.text_out_of_stock}
    {elseif $product.is_edp == 'Y'}
    1 ({$lang.text_edp_product})


    {else}

    {/if}

    {if !($product.zero_price_action == 'R' && $product.price == 0)}




    {if !($settings.General.inventory_tracking == 'Y' && $product.amount < '1' && $product.is_edp != 'Y' && $product.tracking == 'B')}


    {/if}
    {if $auth.user_id && $settings.Modules.wishlist == 'Y'}


    {/if}
    {if $product.feature_comparison == 'Y'}

    {/if}


    {if $settings.DHTML.ajax_add_to_cart == 'Y'}
    {include file="buttons/add_to_cart.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='cart'; fn_http_request('ca', fn_form_get_request('product_details_form_`$produc t.product_id`') + 'ajax=cart_status'); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {else}
    {include file="buttons/add_to_cart.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='cart'; document.product_details_form_`$product.product_id `.submit(); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {/if}

    {if $settings.DHTML.ajax_add_to_cart == 'Y'}
    {include file="addons/wishlist/add_to_wishlist.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='wishlist'; fn_http_request('wl', fn_form_get_request('product_details_form_`$produc t.product_id`') + 'ajax=wish_list'); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {else}
    {include file="addons/wishlist/add_to_wishlist.tpl" but_onclick="javascript: if (fn_check_exceptions(`$product.product_id`)) `$ldelim` document.product_details_form_`$product.product_id `.`$target_name`.value='wishlist'; document.product_details_form_`$product.product_id `.submit(); `$rdelim` else alert('`$lang.cannot_buy`');"}
    {/if}

    {include file="buttons/add_to_compare_list.tpl" product_id=$product.product_id}

    {/if}


    {if $settings.Modules.customers_also_bought == 'Y' && $customers_also_bought}
    {$lang.customers_also_bought}


    {/if}
    {if $related_products}
    {$lang.related_products}


    {/if}
    {if $settings.Modules.discussion == 'Y'}

    {/if}
    {*{if $settings.Modules.send_to_friend == 'Y'}
    {$lang.send_to_friend}


    {/if}*}



    {*************** configurator ****************}
    {if $settings.Modules.product_configurator == 'Y'}
    {include file="addons/product_configurator/product_configurator_groups.tpl" product_id=$product.product_id product_configurator_groups=$product_configurator_groups}
    {/if}
    {*************** /configurator ****************}




    {$product.full_description|default:$product.short_description}

    {*{if $product.image_pairs}



    {include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
    {/if}*}

    add images
    related
    reveiws
    send to friend
    {/capture}
    {include file="common_templates/mainbox.tpl" title=$product.product content=$smarty.capture.mainbox}


      {if $product.image_pairs}
    • Additional Images

    • {/if}
      {* Below will check if above modules are active and have content otherwise this will be default tab*}
      {if $product.related_products }

    • {$lang.related_products}

    • {/if}
      {* Below will check if above modules are active and have content otherwise this will be default tab*}
      {if $settings.Modules.discussion == 'Y'}

    • {$lang.discussion_title_product}

    • {/if}
      {* Below will check if above modules are active and have content otherwise this will be default tab*}
      {if $settings.Modules.send_to_friend == 'Y'}

    • {$lang.send_to_friend}

    • {/if}
      {* Also purchased is not enabled
      {if $product.customers_also_bought }
    • {$lang.customers_also_bought}

    • {/if}*}






    {if $product.image_pairs}
    {include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}
    {/if}


    {if $settings.Modules.related_products == 'Y'}
    {include file="addons/related_products/customer_product_details.tpl"}
    {/if}


    {if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/discussion.tpl" object_id=$product.product_id object_type="P" title=$lang.discussion_title_product quicklink="disussion_link"}
    {/if}


    {if $settings.Modules.send_to_friend == 'Y'}
    {include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product}
    {/if}

    {* this has been left outside of the tabs enabled below still*}

    {if $settings.Modules.customers_also_bought == 'Y'}
    {include file="addons/customers_also_bought/product_details.tpl"}
    {/if}



    {if $settings.Modules.customers_also_bought == 'Y'}
    {include file="addons/customers_also_bought/product_details.tpl"}
    {/if}
    {*if $settings.Modules.related_products == 'Y'}
    {include file="addons/related_products/customer_product_details.tpl"}
    {/if*}
    {*if $settings.Modules.discussion == 'Y'}
    {include file="addons/discussion/discussion.tpl" object_id=$product.product_id object_type="P" title=$lang.discussion_title_product quicklink="disussion_link"}
    {/if*}
    {*{if $settings.Modules.send_to_friend == 'Y'}
    {include file="addons/send_to_friend/send_to_friend.tpl" notes_data=$product.product|escape:html}
    {/if}*} ```

    Thats why I dont like modifying code I cant test.

    Will have a Dev Site set up soon too, just not had much time…



    The principles where in place :oops: