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)
-   -   Moving Gift Certificates to Categories (https://forum.x-cart.com/showthread.php?t=52745)

BAlexander 03-10-2010 05:45 PM

Moving Gift Certificates to Categories
 
Has anyone ever tried to move Gift Certificates out of the Specials box and into the Categories list? What code needs to be moved and to where. Thanks.

Shamun 03-10-2010 08:46 PM

Re: Moving Gift Certificates to Categories
 
I have done it on my site, but this is for 4.2.1.
I don't know about 4.3.1


In skin1/customer/special.tpl look for code that looks like:
Code:

{capture name=submenu}

  {if $active_modules.Manufacturers ne "" && $config.Manufacturers.manufacturers_menu ne "Y"}
      <li><a href="manufacturers.php">{$lng.lbl_manufacturers}</a></li>
  {/if}

  {if $active_modules.Gift_Certificates ne ""}
    {include file="modules/Gift_Certificates/gc_menu.tpl"}
  {/if}

  {if $active_modules.Gift_Registry ne ""}
    {include file="modules/Gift_Registry/giftreg_menu.tpl"}
  {/if}

  {if $active_modules.Feature_Comparison ne ""}
    {include file="modules/Feature_Comparison/customer_menu.tpl"}
  {/if}

  {if $active_modules.Survey}
    {include file="modules/Survey/menu_special.tpl"}
  {/if}

  {if $active_modules.Special_Offers ne ""}
    {include file="modules/Special_Offers/menu_special.tpl"}
  {/if}

{/capture}


Look for the {if}{/if} for gift certs. Copy that.

Open up skin1/customer/categories.tpl and then right before the {/if} add in your statement. Mine looks like this:

Code:

{*
$Id: categories.tpl,v 1.33 2008/11/06 16:53:53 max Exp $
vim: set ts=2 sw=2 sts=2 et:
*}
{capture name=menu}

{if $active_modules.Fancy_Categories}

  {include file="modules/Fancy_Categories/categories.tpl"}
  {assign var="additional_class" value="menu-fancy-categories-list"}

{else}

  <ul>
    {foreach from=$categories_menu_list item=c}
      <li><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category}</a></li>
    {/foreach}
  </ul>

  {assign var="additional_class" value="menu-categories-list"}

  <ul>
    {if $active_modules.Gift_Certificates ne ""}
    <li>{include file="modules/Gift_Certificates/gc_menu.tpl"}</li>
  {/if}
  </ul>
{/if}

{/capture}

{include file="customer/menu_dialog.tpl" title=$lng.lbl_categories content=$smarty.capture.menu}


BAlexander 03-11-2010 06:09 AM

Re: Moving Gift Certificates to Categories
 
Thanks for that, it might work. I don't know yet because something strange is going on. I didn't work when I tried but as a test I added a new category and that is not showing up either. It shows up in the database but not in the store so I can't really say till I get this new problem resolved. (I hate computers.)

When I finally get this resolved, can you tell me where in the categories list the gift certificates show up? Top, bottom, do you have any control over it?

Thanks very much for your help.

amy2203 03-11-2010 06:22 AM

Re: Moving Gift Certificates to Categories
 
try clearing your cache

Shamun 03-11-2010 08:29 AM

Re: Moving Gift Certificates to Categories
 
Since you added it at the end of the statement, it will be the last. You could add it at the top if you want it first, but as for getting it right in the middle I'm unsure as it would have to be in the loop statement and I have no idea on how to get that working properly.


All times are GMT -8. The time now is 11:17 AM.

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