![]() |
At long last - edit Gift Certificate amounts and codes from your admin panel
This nice little elegant mod will allow you to add value back to a Gift Certificate when necessary, or even change the code itself if you'd like to use a custom Gift Certificate code.
It's safe too because it requires entering "edit mode" before you can change any of these values, lessening the probability of an accidental edit. First, in /admin/giftcerts.php, BEFORE: Code:
$expired_condition=($config["Gift_Certificates"]["gc_show_expired"]=="Y"?"":" and status!='E'"); Add (right after the else): Code:
if($_GET["mode"]=="edit_values") { In /skin1/modules/Gift_Certificates/gc_admin.tpl, after: Code:
<form name="gcform" action="giftcerts.php" method="post"> Add: Code:
{if $edit_values} Find: Code:
<td><a href="giftcerts.php?mode=modify_gc&gcid={$giftcerts[gc_num].gcid}">{$giftcerts[gc_num].gcid}</a>{if $giftcerts[gc_num].orderid} <img src="{$ImagesDir}/lock.gif" />{/if}</td> And replace it with: Code:
{if $edit_values} Finally find: Code:
{include file="currency.tpl" value=$giftcerts[gc_num].debit}/{include file="currency.tpl" value=$giftcerts[gc_num].amount} And replace it with: Code:
{if $edit_values} For appearances sake, I also prefer to change (on line 180): Code:
<td align="center" nowrap="nowrap"> To: Code:
<td align="left" nowrap="nowrap" style="padding-left:5px"> |
Re: At long last - edit Gift Certificate numbers and values from your admin panel
Will this work for 4.1.18?
I know I wish I could hide Gift Certificates without deleting. I have to delete them because they create an un-managable looooonnnnnggg list. But I would rather be able to keep them so I have a record of Gift Certificates sent. It would also be nice to be able to sort by date added and add a visible note. Instead I have to make my note as the From field, so I know what it is for. Not very intiutive,. Anyone know of a mod that might have these features? |
Re: At long last - edit Gift Certificate numbers and values from your admin panel
Quote:
This worked fine with 4.1. I don't think GC changed much from 4.1 to 4.2. |
Re: At long last - edit Gift Certificate numbers and values from your admin panel
Can anyone help make this work on 4.4? I tried, but the step requiring replacing this code does not exist in 4.4's /skin/common_files/modules/Gift_Certificates/gc_admin.tpl
Code:
{include file="currency.tpl" value=$giftcerts[gc_num].debit}/{include file="currency.tpl" value=$giftcerts[gc_num].amount} |
Re: At long last - edit Gift Certificate numbers and values from your admin panel
Currency changed in 4.4 so change:
Code:
{include file="currency.tpl" value=... Code:
{currency value=... |
Re: At long last - edit Gift Certificate numbers and values from your admin panel
Thanks! I made that change, but unfortunately I'm not seeing anywhere to actually edit a gift certificate. Where does the interface change to allow the editing?
|
Re: At long last - edit Gift Certificate numbers and values from your admin panel
Looks like there should be a new Change link added to gc_admin.tpl
|
Re: At long last - edit Gift Certificate numbers and values from your admin panel
1 Attachment(s)
All right, I got this working on 4.4.3. All steps are the same as outlined in the OP, aside from these minor changes:
This file Code:
/skin1/modules/Gift_Certificates/gc_admin.tpl Is located in your site's skin directory, either Code:
/skin/common_files/modules/Gift_Certificates/gc_admin.tpl or Code:
/skin/YOUR_SKIN/modules/Gift_Certificates/gc_admin.tpl And this step: Code:
{include file="currency.tpl" value=$giftcerts[gc_num].debit}/{include file="currency.tpl" value=$giftcerts[gc_num].amount} should read: Code:
{currency value=$giftcerts[gc_num].debit}/{currency value=$giftcerts[gc_num].amount} The edit link appears in the Gift Certificate screen as shown in the attachment, and when clicked, changes the "GiftCert ID" and "Rem./Amount fields" into editable fields. One thing to note, is that the Amount field can not be changed to anything larger than the original value of the GC, but anything equal to or less is fine. |
Re: At long last - edit Gift Certificate numbers and values from your admin panel
Quote:
I can confirm this works on 4.5.5 (mostly because X-Cart never changed the gc_admin.tpl file from XC v4.4.4 to 4.5.5. My file still says [v8 (xcart_4_4_4), etc....] at the top)! :) |
Re: At long last - edit Gift Certificate numbers and values from your admin panel
anyone on 4.6.x try it?
|
All times are GMT -8. The time now is 10:16 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.