X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Send as A Gift at Check Out (https://forum.x-cart.com/showthread.php?t=4213)

MOC 10-08-2003 12:43 PM

Everyone whos intrested, i got a quote for a module for gift wrapping.


http://forum.x-cart.com/viewtopic.php?p=27523#27523

B00MER 10-09-2003 05:43 AM

2 simple product options can solve this without MUCH backend modifications.

First product option of "Gift Wrap" with "No"/"Yes=+20" or however much you want to charge for the Yes selection.

The other would be setup like so: Option class should be "ShipGift", option text can be whatever you want to be displayed next to the field, I did "If you want to ship this gift elsewhere, enter Address". Now leave Option list blank.

Now edit: skin1/modules/Product_Options/customer_options.tpl:

Replace the below code:

Code:

<input type=text name="product_options[{$product_options[product_option].optclass}]" size=32>

With this:

Code:

{*** allow textarea instead of input area for larger input ***}
{if $product_options[product_option].optclass eq "ShipGift"}
<textarea name="product_options[{$product_options[product_option].optclass}]" COLS=42 ROWS=10></textarea>
{else}
<input type=text name="product_options[{$product_options[product_option].optclass}]" size=32>
{/if}
{*** end ***}


Now any product option class that is "ShopGift" will have a large textarea to insert data. This is where your user can insert the Address the Gift should be sent to.

Simple solution, I'm doing the same (sorta) thing on www.cartlab.net for the product Notes. If you want to see it in action.

:idea: If you want to insert some data into the textarea (ie. Insert the shipping address here) Just put this text inside the <textarea ...>Insert text here</textarea>.

Why re-invent the wheel? :)


All times are GMT -8. The time now is 03:05 PM.

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