Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » WP eStore Forum » WP eStore Tweaks

Minor issues with inventory

(7 posts) (2 voices)
  • Started 1 year ago by marizs23
  • Latest reply from marizs23
  • Possible Solutions (Related Topics):
    1. eStore - email notification for zero quantity - inventory control
    2. Inventory Control Not Working
    3. Issue(s) Related to Database Table Columns Out of Sync
    4. Re: WP Affiliate issues
    5. File downloading issues

Tags:

  • inventory
  • manage products
  • need help
  • shopping cart
  • shortcode
  1. marizs23
    Member

    I will first start off by saying that eStore is a great plugin. Of course, I first tried almost all of the free ones that claimed to have lots of features, but they always had some fatal error which kept me from using them. I am glad I purchased eStore and have no regrets.

    First thing is a small bug I noticed. If stock of one of my items goes down to zero, then it shows the infinity symbol instead of zero on the "manage products" page. The plugin is interpreting zero and blank space in the inventory control as the same thing(infinity) on the "manage products" page. It would be nice if it could show the words "out of stock" instead of the infinity. This will help when managing large quantities of items.

    The second thing I noticed is a little issue when making a purchase. I know the plugin was originally designed for digital products, but I have a slight inventory control problem when checking out. I will setup the hypothetical situation. My item has 2 in stock. Customer A puts 1 in his cart. Customer B puts 2 in his cart. Customer B makes the purchase before customer A and the stock goes down to zero. Customer A then submits the transaction and purchases the item which was already in his cart, but is no longer in stock. Can the cart be setup to make 1 final check on inventory in the eStore_payment_submission.php file before being submitted to paypal? I know this might be a rare situation for most, but it could pose a problem for a busy site. One last check in the cart submission could mean one less angry customer.

    The third thing I noticed is a little issue when adding items to the cart. If there are 5 items in stock, but the customer tries to add 6, the cart will show an error saying that there are only 5 in stock but will only add 1 item.

    Thank you.

    Posted 1 year ago #
  2. amin007
    Key Master

    Fixed the out of stock issue. When it goes to 0 it will show 0 instead of infinity.

    "Can the cart be setup to make 1 final check on inventory" - This won't fully get rid of this problem anyway. You can still have the issue if customer A takes too long on the PayPal checkout page to do the actual checkout. Out of stock issues are easily solved by sending the customer an email that explains the situation (you can have a canned response for this). Remember, this will only happen in rare occasions but here is my opinion... when you do start to go out of stock due to the fact that a lot of customers are buying your product it is a good problem to have. At that moment you are actually making a lot of money and you can afford to hire a developer to add a lot of bells and whistles to your shopping cart.

    The third one is intentional. Whenever the customer tries to add a quantity that is not available it adds one gives them a message telling them what happened. They can see how many quantities are left and decide if they want it.

    Posted 1 year ago #
  3. marizs23
    Member

    Thanks for the quick response. When you fixed the out of stock issue, when does that plugin file become available?

    edit: I found the answer at http://support.tipsandtricks-hq.com/automatic-update-request

    Posted 1 year ago #
  4. marizs23
    Member

    Okay, I made some code to check the quantities of the shopping cart before sending it to paypal. I realized that if somebody takes too long on paypal, their session will expire. But if somebody puts something into the shopping cart, it could sit there a very long time, giving it a better chance to run out of stock by the time they make up their mind and purchase. My problem isnt that I am selling too quickly, but just that I never have alot of my items in stock because they are handmade.

    My code is a little rusty as I have not written any wordpress plugins or firefox extensions for a couple of years now. But here is a link to the modified page to catch the error. http://host4.network-device.net/share/eStore_payment_submission.txt Changes started at line 145. To test it out, just add some items to your cart. While the items are in the cart, go to manage products page and reduce the quantity to a number less than is in your cart. Hit paypal button.

    Posted 1 year ago #
  5. marizs23
    Member

    I now added code so that when a customer tries to add 10 products, while there are only 7 in stock, 7 will be added instead of the default 1. I made the change on line 409 of wp_eStore1.php

    //$_POST['add_qty'] = 1; //Add one by default
    global$wpdb;
    $products_table_name = WP_ESTORE_PRODUCTS_TABLE_NAME;
    $id = $_POST['item_number'];
    $retrieved_product = $wpdb->get_row("SELECT * FROM $products_table_name WHERE id = '$id'", OBJECT);
    $_POST['add_qty'] = $retrieved_product->available_copies;

    This does not interfere with the customer being notified of the quantity limit.

    Posted 1 year ago #
  6. amin007
    Key Master

    What you have done looks good. Are you getting an error with the code?

    Posted 1 year ago #
  7. marizs23
    Member

    No errors here. It seems to work fine, as I have tested it many times. Thanks.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin