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

Multi -Variant with date - show only future dates

Started by autodafe, August 29, 2016, 17:29:06 PM

Previous topic - Next topic

autodafe

VM 3.0.16
Joomla 2.5.19
PHP 5.4

I have set up a multivariant (we sell courses) with City and Date as Option and it works perfectly

I was wondering if there could be any way to display only futire dates in the dropdowns and hide past courses.

I think it should be possible by modifying the file responsible for generating dropdowns...but where is it located? any hint?

GJC Web Design

haven't tried in a multivar but in a shopper field datepicker I overide in the template with something like this:


jQuery(document).on( "focus",".datepicker", function() {

if(this.id == 'vm_deliver_date_field_text'){ //add the id of the datepicker
jQuery( this ).datepicker({
firstDay: 1,
changeFirstDay: false,
minDate: +1,
changeMonth: true,
changeYear: true,
dateFormat:"yy-mm-dd",
defaultDate: +1
                  });
}
});



other variables can be set

you can strikethru old dates with

<style type="text/css">
   .ui-state-disabled .ui-state-default, .ui-widget-content .ui-state-disabled .ui-state-default, .ui-widget-header .ui-state-disabled .ui-state-default {
     background-image: none;
     opacity: 1;
     text-decoration: line-through;
   }
</style>
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

autodafe