Modifications for the Date Price Calendar for WooCommerce WordPress plugin:
Don't forget to disable plugin update after applying a modification:
https://stackoverflow.com/questions/17897044/wordpress-how-to-disable-plugin-update
- Disable weekends and holidays
-
This modification will add settings to disable weekends Saturday and Sunday and holidays.
The holidays should be specified in the following format: month day, month day ...
Example:
1 1, 1 18, 2 15
screenshot 1
screenshot 2
download modified files and instructions : disable_weekends_and_holidays.zip
download the Date Price Calendar 1.0.0 plugin with all files modified: odp_1.0.0_with_weekends_and_holidays.zip
- Disable ordered dates
-
It will save all ordered (out of stock) dates and will display them as disabled on the front-end product page.
It will make the date available again if the order is canceled or deleted.
You can adjust the number of orders per date to make it "out of stock" in the file:
wp-content/plugins/date-price-calendar/Model/Product/Order.php
on line 30:
$stockLimit = 1;
screenshot
download modified files and instructions : disable_ordered_dates.zip
download the Date Price Calendar 1.0.0 plugin with all files modified: odp_1.0.0_with_disable_ordered_dates.zip
- Calendar dependent on product option
-
This modification will make the popup calendar dependent on a product option.
After selecting the option only the specified days of the week will be available for selection in the calendar.
You can specify days of the week with special parameter "| days_of_week" in the option value title.
Example:
Class A | days_of_week 1,3
screenshot 1
screenshot 2
download modified files and instructions : dependent_on_product_option.zip
download the Date Price Calendar 1.0.0 plugin with all files modified: odp_1.0.0_with_calendar_dependent_on_product_option.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_calendar_dependent_on_product_option.zip
- Product option dependent on calendar
-
This modification will make a product option dependent on the popup calendar.
After selecting the date only the specified option values for the selected day of the week will be available for selection.
You can specify days of the week with special parameter "| days_of_week " in the option value title.
Example:
10:00-10:30 | days_of_week 1,3
This modification works only with a radio button option.
But it is possible to edit the .js file to make it work for drop-down select options also.
screenshot 1
screenshot 2
download modified files and instructions : product_option_dependent_on_calendar.zip
download the Date Price Calendar 1.0.0 plugin with all files modified: odp_1.0.0_with_product_option_dependent_on_calendar.zip
download the Product Options 1.0.0 plugin with all files modified: pofw_1.0.0_with_product_option_dependent_on_calendar.zip
- Display upcoming dates
-
This modification will display upcoming dates below the text field option on the front-end product page as:
8 July - 18 July 10 euro
22 July - 26 July 20 euro
screenshot
download modified files and instructions : display_upcoming_dates.zip
download the Date Price Calendar 1.0.0 plugin with all files modified: odp_1.0.0_with_display_upcoming_dates.zip
- Create default product option
-
Allow administrator to use the default option that will be created after saving the product.
screenshot 1
screenshot 2
download modified files and instructions : create_default_option_for_calendar.zip
download the Date Price Calendar 1.0.0 plugin with all files modified: odp_1.0.0_with_create_default_option.zip
- Multiple calendar options per product
-
One of the possible solutions to have multiple calendars per product is to rename this plugin and then install the renamed copy.
So that you will have two calendar options per product.
screenshot 1
screenshot 2
download modified files and instructions : renamed_plugin_copy.zip
After downloading the .zip archive you should unzip it on your computer. It contains few renamed plugin versions.
- Custom date format
-
If you need to add a new date format like d.m.y
screenshot
Instructions : custom_date_format.txt - Display prices in calendar
-
This modification will display prices inside the date cells of the popup calendar.
screenshot
download modified files and instructions : display_prices_in_calendar.zip
download the Date Price Calendar 1.0.0 plugin with all files modified: odp_1.0.0_with_prices_in_calendar.zip
- Hijri calendar with Islamic dates
-
This modification will display Islamic dates of the Hijri calendar together with the Gregorian.
It uses code of jQuery UI datepicker with Hijri calendar:
https://github.com/othmanoss/datepicker-hijri
screenshot
download modified files and instructions : islamic_dates_Hijri_calendar.zip