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)
-   -   Remove Emailoption Gift Certificate (https://forum.x-cart.com/showthread.php?t=51214)

Harmedia 12-09-2009 10:41 AM

Remove Emailoption Gift Certificate
 
Dear Community,

I would like to remove the email option of the gift certificates. Then its only possible to send them by mail.

Which lines and files do I need to edit for this? I searched for an existing thread but I couldn't find one.

Kind regards

cflsystems 12-09-2009 11:26 AM

Re: Remove Emailoption Gift Certificate
 
You need to edit /skin1/modules/Gift_Certificates/customer/giftcert.tpl
Comment out this bit of code and see how it works

<tr>
<td colspan="3" class="giftcert-delivery-method">
{if $config.Gift_Certificates.enablePostMailGC eq "Y"}
<label>
<input type="radio" name="send_via" value="E" onclick="javascript: switchPreview();"{if $giftcert.send_via ne "P"} checked="checked"{/if} />
{$lng.lbl_gc_send_via_email}
</label>
{else}
<input type="hidden" name="send_via" value="E" />
{/if}
</td>
</tr>
<tr>
<td colspan="3" class="giftcert-subtitle">{$lng.lbl_gc_enter_email}</td>
</tr>
<tr>
<td class="data-name">{$lng.lbl_email}</td>
<td class="data-required">*</td>
<td><input type="text" name="recipient_email" size="30" value="{$giftcert.recipient_email|escape}" /></td>
</tr>

Harmedia 12-09-2009 03:27 PM

Re: Remove Emailoption Gift Certificate
 
Thanks for the information.

There is a major problem tho. If i comment it out, it removes the email option from the page, but its still enabled. If you dont tag the send by Mail radiobutton, then it sends it to an empty email adress. I want the default to be Mail and not e-mail.

Anything that can be done about that?

Kind regards

Harmedia 12-09-2009 03:36 PM

Re: Remove Emailoption Gift Certificate
 
Nevermind,

I fixed the problem by changing:

Code:

<input type="radio" name="send_via" value="E" onclick="javascript: switchPreview();"{if $giftcert.send_via ne "P"} checked="checked"{/if} />

into:

Code:

<input type="radio" name="send_via" value="E" onclick="javascript: switchPreview();"{if $giftcert.send_via eq "P"} checked="checked"{/if} />

I changed eq at the Mail option in ne ofcourse. In that way, the Mail option is the default option now.

Kind regards.


All times are GMT -8. The time now is 10:15 AM.

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