News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

datepicker date format in email confirmation

Started by dirkb, April 22, 2016, 22:12:49 PM

Previous topic - Next topic

dirkb

hmmm ... trying, but not getting it to work. how can I change the date format for the datepicker (hold it) in the email confirmations ?

Use the datepicker as a shopper field. I am able to change the format in vmjsapi.php directly (altFormat: "dd-mm-yy") but where can I format the date for the admin and user confirmation emails ?

Its showing me "2016-04-08" for example ... not what I want. Modifying "vmjsapi.php" is also useless, since an update will overwrite it ... and the general LC3, LC4 language overwrites do not work here.

Help ? J 3.5 VM 3.0.14

dirkb

and the COM_VIRTUEMART_DATE_FORMAT_INPUT_J16="d.m.y" constant is obviously not doing anything here, getting "2016-04-08" ???

GJC Web Design

I over ride the date format at the template with JS

something like below then the date is stored as i want it


jQuery(document).ready( function($) {
$(document).on( "focus",".datepicker", function() {
if(this.id == 'vm_deliver_date_field_text'){ //id of datepicker
$( this ).datepicker({
dateFormat:"dd-mm-yy"
}
}
});
});


code not checked
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

dirkb

hmmm ... I will have to try that - if I read that right, add the function in the template/js/template.js - and replace the "vm_deliver_date_field_text" with the field name ... Hmmm, not tried it, but are you sure that this will allow me to format the datepicker date format up to the invoice.php and mail_html.php level ?

GJC Web Design

It can go anywhere that is loaded in the user fields dialog

in my case lately I used it in templates\xxxxxx\html\com_virtuemart\cart\default_cartfields.php

re format.. this is the whole point.. it SAVES the string as dd-mm-yy or whatever in the orders_userinfos table so no conversion is needed anywhere .. it is done
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

dirkb