Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- //Setup your product with an end date of SOMETHING (like +1 day)
- jQuery(document).ready(function($){
- //Setup
- $("#fs_sub_enddate_<?php echo $product['id'] ?>").attr('name', 'sub_enddate<?php echo foxyshop_get_verification('sub_enddate', '--OPEN--'); ?>').val('');
- $("select.variation-subscription-end-date").change(function() {
- if ($(this).val().indexOf("No End Date") >= 0) {
- $("#fs_sub_enddate_<?php echo $product['id'] ?>").val('');
- } else if ($(this).val().indexOf("End After 3 Months") >= 0) {
- $("#fs_sub_enddate_<?php echo $product['id'] ?>").val('<?php echo Date("Ymd", strtotime("+2 months +1 day")); ?>');
- } else if ($(this).val().indexOf("End After 6 Months") >= 0) {
- $("#fs_sub_enddate_<?php echo $product['id'] ?>").val('<?php echo Date("Ymd", strtotime("+5 months +1 day")); ?>');
- }
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement