View Single Post
  #4  
Old 05-01-2004, 06:55 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

Hi Mike,

Thanks for your response, your solution gave me an idea to create a mod for users who need to hide the options header for more than one item.

First take out:

Code:
<tr><td colspan=2> <font class=ProductDetailsTitle>{$lng.lbl_options}</font> </td></tr> <tr><td class=Line height="1" colspan=2>[img]{$ImagesDir}/spacer.gif[/img]</td></tr>

from skin1/customer/main/product.tpl

and then paste on top in skin1/modules/Product_Options/customer_options.tpl

Then, using phpmyadmin or xcarts patch/upgarde thingy; create a new field called od, type: char, lenght/values: 1, null: no
in the table xcart_products

then edit include/product_modify.php:

find the line

Code:
# # Update product data # db_query("update $sql_tbl[products]
and add: od='$od' after any of the queries, i put mine after brand='$brand'

then go to skin1/main/product_modify.tpl

and add this:

Code:
<tr> <td class=ProductDetails height="11">Options Display</td> <td class=ProductDetails height="11"> <select name=od> <option value='N' {if ($product.od eq 'N')} selected {/if}>{$lng.lbl_no}</option> <option value='Y' {if ($product.od eq 'Y')} selected {/if}>{$lng.lbl_yes}</option> </select> </td> </tr>

you can put this anywhere, it is for your use to mark the item to display the options or not, I put mine after the free shipping option.

then finally, go back to skin1/customer/main/product.tpl and change the line:

Code:
{if $active_modules.Product_Options ne ""}

to
Code:
{if $active_modules.Product_Options ne "" and $product.od eq "Y"}

Instead of modifying each product, you should use the import function to change the od field. Now products that don't have product options will cease to display the Options header.
Reply With Quote