| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Delivery Date Chooser | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Delivery Date Chooser
This mod displays a pulldown next to products with a list of dates for the customer to choose for delivery. It's quite simple at the moment, someone might like to run with it to improve it.
Currently set up to not show Sundays or the next day if the time is after 2pm. above "func_display("customer/home.tpl",$smarty); " in products.php insert.. Code:
In /modules/Product_Options/customer_options.tpl below " {assign var="poname" value="product_options[`$v.classid`]"}{/if} " Code:
To get the pulldown to appear for a particular product you need to add a product option as a Text field called 'Delivery Date'. Should look like this in the product screen... I'm not the best coder so use at your own risk etc.. Improvements welcome.
__________________
Core version: 5.5.xx |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Delivery Date Chooser
nice
I will try it thanks
__________________
Web Design Web Design and Custom X-Cart Projects http://www.dataviking.com Mention the forums for discounts! x-cart Version 4.1.8 |
|||||||||
#3
|
|||||||
|
|||||||
Re: Delivery Date Chooser
Thanks for sharing that, it was exactly what i was after.
I managed to get it working on the 'personal details' section of the cart so that a user can choose the shipping date whilst entering the shipping info by using an 'additional field' in the 'user profile option' section of admin
__________________
4.1.7 |
|||||||
#4
|
|||||||
|
|||||||
Re: Delivery Date Chooser
Code:
Nice Mod, I have it all working apart from it actually appearing on the invoice. When i select the date from the drop down options it doesnt copy the selected option into the text field, is there a way to get the selected date to populate the Text field called 'Delivery Date' Can anyone help out ? Thanks
__________________
X-cart Gold - 4.0.18 - 4.1.9 - 4.1.10 - 4.3.0 |
|||||||
#5
|
|||||||
|
|||||||
Re: Delivery Date Chooser
Wow, I just found this modification and am trying to use it in 4.1.8. I seem to get errors if I insert the code above into the customer_options.tpln as specified.
I am just a web designer and not much of a code monkey, so can you please advise as to how it fits into this code. Many Thanks {* $Id: customer_options.tpl,v 1.24 2006/04/07 05:19:21 svowl Exp $ *} {if $product_options ne ''} {if $nojs ne 'Y'} <tr style="display: none;"><td> <script type="text/javascript" language="JavaScript 1.2"> <!-- var alert_msg = '{$alert_msg}'; --> </script> {include file="modules/Product_Options/check_options.tpl"} </td></tr> {/if} {foreach from=$product_options item=v} {if $v.options ne '' || $v.is_modifier eq 'T'} <tr> <td valign="middle" height="25">{if $usertype eq "A"}{$v.class}{else}{$v.classtext|default:$v.class }{/if}</td> <td valign="middle"> {if $cname ne ""} {assign var="poname" value="$cname[`$v.classid`]"} {else} {assign var="poname" value="product_options[`$v.classid`]"} {/if} {if $v.is_modifier eq 'T'} <input id="po{$v.classid}" type="text" name="{$poname}" value="{$v.default|escape}" /> {else} <select id="po{$v.classid}" name="{$poname}"{if $disable} disabled="disabled"{/if}{if $nojs ne 'Y'} onchange="javascript: check_options();"{/if}> {foreach from=$v.options item=o} <option value="{$o.optionid}"{if $o.selected eq 'Y'} selected="selected"{/if}>{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} ({if $o.modifier_type ne '%'}{include file="currency.tpl" value=$o.price_modifier display_sign=1 plain_text_message=1}{else}{$o.price_modifier}%{/if}){/if}</option> {/foreach} </select> {/if} </td> </tr> {/if} {/foreach} {/if} {if $product_options_ex ne ""} <tr> <td colspan="2"><font id="exception_msg" color="red"></font></td> </tr> {if $err ne ''} <tr> <td colspan="2"><font class="CustomerMessage">{$lng.txt_product_options_ combinations_warn}:</font></td> </tr> {foreach from=$product_options_ex item=v} <tr> <td>{foreach from=$v item=o}{if $usertype eq "A"}{$o.class}{else}{$o.classtext}{/if}: {$o.option_name}<br />{/foreach}<br /></td> </tr> {/foreach} {/if} {/if}
__________________
Welcome to my world !! (I use version 4.1. |
|||||||
#6
|
|||||||
|
|||||||
Re: Delivery Date Chooser
Does it work for 4.1.9?
Many thanks,
__________________
Tanya x-cart version: 4.1.7 4.1.9. 4.2 |
|||||||
#7
|
|||||||
|
|||||||
Re: Delivery Date Chooser
Will it work on 4.1.9 and 4.1.11?
|
|||||||
|
|||
X-Cart forums © 2001-2020
|