Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – adding datepicker as a product variation?

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore General Questions › eStore – adding datepicker as a product variation?

  • This topic has 11 replies, 3 voices, and was last updated 9 years, 10 months ago by wpCommerce.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • June 23, 2015 at 1:22 pm #12793
    ZeOneNZeOnly
    Member

    I’m wondering how easy it would be to make a datepicker one of the product variations. Some of my products are rentals and it would be nice to have a way to pick a start and end date when they purchase rather than typing in the dates in a custom field. Is there a way I could insert code into a product variation field to make it a datepicker that would just put the date in for these selections?

    I’ve been using a thank you page form to collect the dates, but not everyone does that after the purchase.

    Does anyone have a solution for this?

    WordPress version: 4.2.2

    WP eStore version: 7.0.7

    June 23, 2015 at 2:58 pm #70525
    wzp
    Moderator

    What you are asking is if there could be 2 date-picker variations; one for the start date, and one for the end date. Consequentially, each of these 2 “variations” could contain an infinite number of values (dates). The current design will not allow this; without an extensive overhaul of how the plugin conceptualizes variations.

    June 23, 2015 at 5:49 pm #70526
    ZeOneNZeOnly
    Member

    What I’m thinking would be a way to just do this on the field..

    Datepicker

    I’m going to give this a shot and see if I can get this to work.

    June 23, 2015 at 10:39 pm #70527
    ZeOneNZeOnly
    Member

    So in eStore_button_display_helper.php

    if($ret_product->custom_input == ‘1’)

    {

    if(!empty($ret_product->custom_input_label))

    $var_output .= ‘<span class=”eStore_custom_input_name”>’.$ret_product->custom_input_label.’: </span><input id=”datepicker” type=”text” name=”custom_input” value=”” class=”eStore_text_input eStore_collect_input” />’;

    else

    $var_output .= ‘<span class=”eStore_custom_input_name”>Instructions: </span><input id=”datepicker” type=”text” name=”custom_input” value=”” class=”eStore_text_input eStore_collect_input” />’;

    if ($line_break) $var_output .= ‘
    ‘;

    else $var_output .= ‘ ‘;

    }

    I added an ID in here, but it’s not showing up in the code. Is there another place where this is generated I’m missing?

    June 23, 2015 at 11:52 pm #70528
    wpCommerce
    Moderator

    @ZeOneNZeOnly, Which shortcode are you using?

    June 24, 2015 at 1:07 am #70529
    ZeOneNZeOnly
    Member

    not using a shortcode, but I can apply the datepicker if I can make an ID on that input from above.

    June 24, 2015 at 1:09 am #70530
    ZeOneNZeOnly
    Member

    I’m not using the custom input for anything else. I just need it to populate that jquery datepicker on that field and it will input the start date as if someone entered it in so it will be on the receipt/order

    June 24, 2015 at 1:11 am #70531
    ZeOneNZeOnly
    Member

    [wp_eStore_fancy1 id=25]

    this is the shortcode on the page I’m using to test

    [http://camprentalgear.com/testing-date-picker/]

    June 24, 2015 at 8:13 pm #70532
    ZeOneNZeOnly
    Member

    anyone? I added the id to that code in the plugin and it’s not showing up :O

    June 25, 2015 at 12:21 am #70533
    wpCommerce
    Moderator

    You edited the correct file. But the code is not there. This is what I see when I view the page:

    <span class="eStore_custom_input_name">Start Date: </span>
    <input type="text" name="custom_input" value="" class="eStore_text_input eStore_collect_input">

    Did you update it via FTP?

    June 25, 2015 at 3:49 am #70534
    ZeOneNZeOnly
    Member

    ahhh I did it via ftp and it worked. I also just had to change

    <script>

    $(function() {

    $( “#datepicker” ).datepicker();

    });

    </script>

    <script>

    jQuery(function() {

    jQuery( “#datepicker” ).datepicker();

    });

    </script>

    Sweet!!!!

    Is there anyway I can modify like variation three to be an input field like this?

    June 26, 2015 at 1:30 am #70535
    wpCommerce
    Moderator

    It may not be possible since variation is not an input field.

  • Author
    Posts
Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ