Page 1 of 1

Delivery Date at checkout

Posted: Sun Apr 15, 2012 12:07 am
by ssjal
hi
There should be a delivery date field at the checkout page so that the customer can select the date at which he wants the product to be delivered.

Thanks...

Re: Delivery Date at checkout

Posted: Sun Apr 15, 2012 3:40 am
by straightlight
This does sound like a good idea. Although, what would happen if the delivery date is selected from an API service ? Selecting from API, it is rather relied on shipping manufacturers to decide when the product would be delivered politically based on their provided service.

Re: Delivery Date at checkout

Posted: Sun Apr 15, 2012 3:47 am
by bingo
ssjal wrote:hi
There should be a delivery date field at the checkout page so that the customer can select the date at which he wants the product to be delivered.

Thanks...
There is an extension function like this:
http://www.opencart.com/index.php?route ... on_id=2079

bingo

Re: Delivery Date at checkout

Posted: Sun Apr 15, 2012 3:53 am
by straightlight
That extension does not seem to instantiate between the customers delivery date option and the API provided services. A contribution should be developed or expanded from an already published contribution knowing whether it's about an API manufacturing service delivery date or rather a customer based regarding the delivery date.

Re: Delivery Date at checkout

Posted: Sun Apr 15, 2012 7:38 am
by straightlight
Done: http://www.opencart.com/index.php?route ... on_id=5969

Extra steps to be applied for the catalog template. The following example is based on the default template. To all those using custom templates must find their way of integrating these instructions on their own or rather as a custom job:

1 - In catalog/view/theme/default/template/checkout/shipping_method.tpl file,

Add the following where you feel is best after this line:

Code: Select all

<?php foreach ($shipping_method['quote'] as $quote) { ?>
add this code:

Code: Select all

<?php if (isset($quote['based_date']) && (int)$quote['based_date'] == 1) { ?>
    <?php echo $text_based_date; ?><input type="text" name="date_delivery" value="<?php echo (!empty($date_delivery)) ? $date_delivery : date('Y-m-d'); ?>" id="date-delivery" size="12" />
<?php } ?>
Then, at the very end of the file,

add:

Code: Select all

<script type="text/javascript"><!--
$(document).ready(function() {
	$('#date-delivery').datepicker({dateFormat: 'yy-mm-dd'});
});
//--></script> 
2 - In catalog/view/theme/default/template/checkout/checkout.tpl file,

find:

Code: Select all

data: $('#shipping-method input[type=\'radio\']:checked, #shipping-method textarea'),
replace with:

Code: Select all

data: $('#shipping-method input[type=\'radio\']:checked, #shipping-method textarea, #date-delivery input[type=\'text\']'),
3 - In catalog/view/theme/default/template/account/order_info.tpl file,

find:

Code: Select all

<b><?php echo $text_shipping_method; ?></b> <?php echo $shipping_method; ?>
add after:

Code: Select all

<?php if (!empty($delivery_date)) { ?>
    <br /><b><?php echo $text_based_date; ?></b> <?php echo $delivery_date; ?>
<?php } ?>
4 - In catalog/view/theme/default/template/mail/order.tpl file,

find:

Code: Select all

<b><?php echo $text_shipping_method; ?></b> <?php echo $shipping_method; ?>
add after:

Code: Select all

<?php if (!empty($text_based_date)) { ?>
    <br /><b><?php echo $text_based_date; ?></b>
<?php } ?>
In PHPMyAdmin, execute the following query from your OC database:

Code: Select all

ALTER TABLE `oc_order` ADD `date_delivery` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
Note: Change the oc_ prefix into the real prefix name if using another prefix name.

This should work.

Re: Delivery Date at checkout

Posted: Tue Apr 17, 2012 12:13 pm
by ssjal
Thanks straightlight for this excellent module...

i have a question regarding the same.

Eg: if i use Fedex API for getting shipping quotes, the delivery dates are decided by api and the customer would not be able to select the delivery date.

but if the customer wants to give pre-order(advance booking) of the products say the products have to be delivered after a week, how can customer provide the delivery date.

Re: Delivery Date at checkout

Posted: Tue Apr 17, 2012 7:06 pm
by straightlight
but if the customer wants to give pre-order(advance booking) of the products say the products have to be delivered after a week, how can customer provide the delivery date.
Since manufacturers would already provide the time period, the tracking ID would need to be provided to customers upon confirmed checkout so for them to go on Fedex website OR to use the tracking ID from their account if the author of the Fedex contribution did integrated this feature from their account already. ;)

This methodology wouldn't require for customers to fill out their own time of delivery since shippers already takes that decision politically once the option selected from your store by customers.

Re: Delivery Date at checkout

Posted: Mon Aug 27, 2012 5:49 pm
by phanvua8
When i choose, it always said "Please select the Delivery Date."

Re: Delivery Date at checkout

Posted: Thu Oct 04, 2012 12:09 am
by globalwebdesign
I am relatively new to OpenCart, so it's very likely I missed something during the installation. But I can't get the Based Date option to appear in the Admin section. VQMod is installed, I uploaded the files and modified the templates and database as specified, but I still don't see anything new in the Admin section. Am I missing something?