To finalize the delivery time, depending on the characteristics of the goods
Good afternoon.
Need help with shop-cript.
The characteristics of the product there is a hidden feature "shipping": http://prntscr.com/tk6pqp
In some products it will be used as the digit number of hours for delivery.
Need:
1. To on the product page will automatically calculate the delivery date into account, if this product has such a parameter, it is added to the clock to date. And in the end, expect delivery date was correct.
For example, now on the product http://new.rem52.ru/sredstvo-dlja-udalenija-betona-i-cementa-extra-5-l/ specify the scheduled delivery date is July 20, 2020. And if you add in the feature of "shipping" figure 24, the scheduled delivery date should be July 21, 2020. If you add 48, it should be 22 July 2020.
A screenshot to understand: http://prntscr.com/tk6xwy
2. So when ordering, we checked if among the goods, there is at least one product, which has filled the field "shipping", then find the maximum period of this delivery among the products and take it into account in the final delivery date. In the selection of the desired delivery date to the minimum date to add this term to the final delivery date was shifted to this period.
For example, in the basket 3 products. One nothing is specified in the delivery, another 24 hours, and the third 48 hours. Then for the entire basket delivery period shifts to 48 hours.
A screenshot to understand: http://prntscr.com/tk6zdi
The plugin is used delivery https://www.webasyst.ru/store/plugin/shop/dp/