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

Validate On Qty Text box

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Validate On Qty Text box

  • This topic has 9 replies, 2 voices, and was last updated 13 years, 2 months ago by gerardyap.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • March 2, 2012 at 11:07 am #5727
    gerardyap
    Member

    Hi,

    the present estore plugin allow invalid character to be entered in the qty textbox. Would need advice on how to validate the textbox which allow only numeric value.

    Also, would it be possible to update the Qty using hyperlink word eg. Update. If user wants to change qty in the textbox. He/she will make amendment on the qty textbox followed by clicking the update word below the textbox. Once thats done, the word will Saved will be reflected.

    Thanks

    March 3, 2012 at 2:00 am #42588
    admin
    Keymaster

    We try to keep the number of buttons in the shopping cart to a minimum so that the same shopping cart can be used on a sidebar (too many buttons in the cart makes it hard to fit in the sidebar). When you change the quantity value in the shopping cart it will automatically display the following warning which tells the customer what to do:

    Hit enter to submit new Quantity

    This seem to work well but I understand what you are asking for. I have just added an option so that you can show an “Update” button next to the quantity field in the shopping cart. Please get a new build of the plugin from here:

    https://support.tipsandtricks-hq.com/update-request

    Then find the following line of code in the “eStore_advanced_configs.php” file:

    define('WP_ESTORE_SHOW_UPDATE_BUTTON_FOR_QTY_CHANGE', '0');

    Once you find it change it to the following to enable this option:

    define('WP_ESTORE_SHOW_UPDATE_BUTTON_FOR_QTY_CHANGE', '1');

    Also, it will show an error message if a customer enters a non numeric value in the quantity field.

    March 5, 2012 at 7:00 pm #42589
    gerardyap
    Member

    Hi,

    it works with the update button..what would be the code to add if i would like to have a box that surround the qty portion ? i tried adding the following code below on eStore cart php, but it was unsuccessful. Do you guys do customization of this plugin for a fee ? I have the intention to send my requirement and need someone to help me to modify the plugin according to my preference.

    $output .= “<td style=’text-align: left’><form method=”post” action=”” name=’peStore_cquantity’ style=’display: inline-block;border-width:1px;border-style:Solid;border-color:#BFBFBF;width:30px’>

    <input type=”hidden” name=”product” value=””.htmlspecialchars($item).”” />

    <input type=’hidden’ name=’eStore_cquantity’ value=’1′ /><input type=’text’ name=’quantity’ value='”.$item.”‘ size=’1′ class=’eStore_cart_item_qty’ />”;

    if(WP_ESTORE_SHOW_UPDATE_BUTTON_FOR_QTY_CHANGE === ‘1’){

    $output .= ‘<input type=”submit” value=”‘.ESTORE_UPDATE.'” class=”eStore_update_qty” />’;

    }

    $output .= “</form></td>”;

    }

    March 6, 2012 at 12:08 am #42590
    admin
    Keymaster

    You should be able to do that just from the CSS by adding border to your text input inside the cart. Yeah we take on some customization work from time to time. You can use the contact form on the site to get in touch with us and discuss details.

    March 8, 2012 at 5:08 pm #42591
    gerardyap
    Member

    Hi,

    noted with thanks.

    March 12, 2012 at 2:47 pm #42592
    gerardyap
    Member

    Hi,

    I tried entering non numeric value in the quantity, but there isn’t any error shown. I have done define(‘WP_ESTORE_SHOW_UPDATE_BUTTON_FOR_QTY_CHANGE’, ‘1’) , but still fail.

    Do advise.

    March 13, 2012 at 1:27 am #42593
    admin
    Keymaster

    Post a link to the page where I can go and add an item to the cart.

    March 13, 2012 at 1:36 am #42594
    gerardyap
    Member

    hi,

    my web is live and link is under draft mode. I’m afraid if i published it, it may cause some miscommunication. Is there any other ways to do it.

    my website is http://www.mjhub.biz

    March 13, 2012 at 8:00 am #42595
    gerardyap
    Member

    hi,

    thanks for your help.. below is the link. thanks

    http://www.mjhub.biz/?p=28466

    March 13, 2012 at 8:57 am #42596
    gerardyap
    Member

    Hi,

    I manage to find a solution. thanks for your help

  • Author
    Posts
Viewing 10 posts - 1 through 10 (of 10 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