Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Modification Based on Manufacturer Mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #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
  #2  
Old 01-28-2008, 06:27 PM
 
dataperk dataperk is offline
 

Newbie
  
Join Date: Jun 2007
Posts: 7
 

Default Re: Modification Based on Manufacturer Mod

Got the images working, I had forgotten to change the image type to "A" to "M". Found the last reference to M and changed it to A, and my author images are updating.

Still having problems getting the drop down to populate with my authors. I am sure it is a similar problem, but there is so much to go through, I don't know where to look.

Found others on the forum attempt similar mods, anyone have any success? Seems a popular mod, perhaps a more able person will make one for us? Hopefully I'll have mine done by then
__________________
Version 4.1.7
Reply With Quote
  #3  
Old 01-30-2008, 12:38 PM
 
dataperk dataperk is offline
 

Newbie
  
Join Date: Jun 2007
Posts: 7
 

Default Re: Modification Based on Manufacturer Mod

Just to complete this thread I thought I would update and let you know this worked great! Exactly what I needed, which is an exact copy of the manufacturers module. There were A LOT of places to add the code, but it does what it is supposed to, and my client is happy
__________________
Version 4.1.7
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:07 PM.

   

 
X-Cart forums © 2001-2020