X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Modification Based on Manufacturer Mod (https://forum.x-cart.com/showthread.php?t=37113)

dataperk 01-28-2008 01:55 PM

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!!

dataperk 01-28-2008 06:27 PM

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 :wink:

dataperk 01-30-2008 12:38 PM

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 :D


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.