Use on Checkout with General User Definable 3

Modifies the standard Date Prompt to open an interactive calendar in a small overlay.
Post Reply
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Use on Checkout with General User Definable 3

Post by norman »

DatePicker can be activated on the checkout to work on one of the user definable fields. Here's how to use it on General User Definable 3.

Go to Design / Text / Web Site (cont) / General Information / General User Definable 3. Check "Show" and set "Current Value" to something like "When do you want it to ship". Set "Required" as appropriate for your site.

Go to Design / Library / Layouts / Checkout Prompt / General User Definable 3 RWD.
Replace all code there with the following:

Code: Select all

<fieldset>
	<div class="checkout-field-label">
		<label for="GENERALUSERDEFINED"><actinic:block if="%3cactinic%3avariable%20name%3d%22GeneralPrompt002Required%22%20%2f%3e"><span class="actrequired"></actinic:block><Actinic:Variable Name="GeneralPrompt002"/><actinic:block if="%3cactinic%3avariable%20name%3d%22GeneralPrompt002Required%22%20%2f%3e">* </span></actinic:block></label>
	</div>
	<div class="checkout-field-input">
		<input class="dpdate" readonly type="text" name="GENERALUSERDEFINED" size="40" maxlength="255" value="<Actinic:Variable Name="GeneralUserDefined"/>" 
			data-dformat="<actinic:variable name="DatepickerDateFormat" />"
			data-sdate="<actinic:variable name="DatepickerStartDate" />"
			data-edate="<actinic:variable name="DatepickerEndDate" />"
		/>
	</div>
</fieldset>
This will use the settings in Settings / Site Options / Prompts / DatePicker.

Tested on SD 2018.
Norman
Post Reply