View Single Post
  #1  
Old 01-28-2008, 01:55 PM
 
dataperk dataperk is offline
 

Newbie
  
Join Date: Jun 2007
Posts: 7
 

Default Modification Based on Manufacturer Mod

I have created an "Authors" mod based on the Manufacturers mod, which means basically I have found every mention of manufacturers, and added a similar authors reference. I have also updated the database (xcart_authors, xcart_authors_lng, etc) and language (English) files.

I almost have it, except for a few things:
  • I created xcart_images_A and corresponding images/A directory, but updating the image does not work.
  • I added a drop down select box on product details page (template main/product_details.tpl), yet my drop down does not fill with authors from my xcart_authors table.
main/product_details.tpl:
PHP Code:
{if $active_modules.Authors ne ""}
<
tr>
    {if 
$geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[author]" /></td>{/if}
    <
td class="FormButton" nowrap="nowrap">{$lng.lbl_author}:</td>
    <
td class="ProductDetails">
    <
select name="authorid">
        <
option value=''{if $product.authorid eq ''selected="selected"{/if}>{$lng.lbl_no_author}</option>
    {foreach 
from=$authors item=a}
        <
option value='{$a.authorid}'{if $a.authorid eq $product.authoridselected="selected"{/if}>{$a.author}</option>
    {/foreach}
    </
select>
    </
td>
</
tr>
{/if} 

Has anyone tried something similar, and if so, could you help me find what I have missed? I can successfully add and manage authors, so I am close.

Thanks in advance!!
__________________
Version 4.1.7
Reply With Quote