osCmax v2.5 User Manual
Results 1 to 8 of 8

Help with the 'Buy it Now' <> 'Out of Stock' MOD

This is a discussion on Help with the 'Buy it Now' <> 'Out of Stock' MOD within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I'm using osCMax 2.0.2 (with some slight mods) and I'm trying to determine if this MOD is compatible directly or ...

      
  1. #1
    New Member
    Join Date
    May 2009
    Posts
    13
    Rep Power
    0


    Default Help with the 'Buy it Now' <> 'Out of Stock' MOD

    I'm using osCMax 2.0.2 (with some slight mods) and I'm trying to determine if this MOD is compatible directly or if I will have to dig deeper.
    I'm looking at 2382 - osCommerce: Stock Status in Product Listing

    Is this alredy in 2.0.2 and I just can't figure out how to make it work or is the osCommerce version directly compatible...

    Just need advice from those who have it working...

    Ideally I would like to have the MOD to replace the BUY NOW with the Order Qty Box and a single BUY NOW button at the bottom (can't remember that MOD # off the top of my head) but have the Order Qty box replaced with 'Out of Stock' where necessary.
    Still need for all items (in & out of stock) to appear on the product list.
    The development site I'm working on is here if anyone wants to gawk at it... Max Test TomatoBabyCompany :

    You guys are great, and I love this package... when things slow down at the 'real job' I'm going to try and help with some development.
    I will admit my biggest issue is making sense of the code variations between versions. I have a hard time following the sequence...
    Might I suggest some stickies with links to the 'latest & greatest' development docs (or maybe they already exist and I haven't found them yet...!)

  2. #2
    New Member
    Join Date
    May 2009
    Posts
    13
    Rep Power
    0


    Default Re: Help with the 'Buy it Now' <> 'Out of Stock' MOD

    Ok, well, I figured it out.
    It is pretty much directly compatible with one exception.
    Have to include the array index ( [$x] ) for the quantity, like so...

    if ((STOCK_CHECK == 'true')&&($listing[$x]['products_quantity'] < 1)) {
    $lc_text = '&nbsp;';
    } else {
    $lc_text = '<CENTER><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a></CENTER>';
    }

    Other than that, it works like a charm.
    I did some tweaks here and there, but it works great.

  3. #3
    osCMax Development Team
    Join Date
    Nov 2002
    Location
    Orlando
    Posts
    433
    Rep Power
    14


    Default Re: Help with the 'Buy it Now' <> 'Out of Stock' MOD

    I did kind of mod to my site a few years ago and I had the same problem on the product listing page. Since it works well enough I haven't tinkered with it. But, I have it show an out of stock button instead of the buy now and have my "in stock" message away from the button. I made a diff that I'll attach so you can try it if you like.
    Attached Files Attached Files
    John

  4. #4
    Active Member MindTwist's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona, Spain
    Posts
    409
    Rep Power
    7


    Default Re: Help with the 'Buy it Now' <> 'Out of Stock' MOD

    I am not sure if that is what you are looking for, but you can check out one of my stores (second link on my sig), and on any product you will see there is a text box to enter a number, and add X units of a product to the cart.

  5. #5
    New Member
    Join Date
    Sep 2008
    Posts
    14
    Rep Power
    0


    Default Re: Help with the 'Buy it Now' <> 'Out of Stock' MOD

    Hi Mindtwist
    I am looking for a contribution that will add the text box for the quantity of a product to add to your cart.
    I cant find one, maybe I am searching for the wrong thing....!
    just like you state above for the products on Twisted Tienda

    the other is to display products that are out of stock, but with the ability to still order from a 'back catalogue'

    is this possible?

    any suggestions are very much appreciated!

  6. #6
    Active Member MindTwist's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona, Spain
    Posts
    409
    Rep Power
    7


    Default Re: Help with the 'Buy it Now' <> 'Out of Stock' MOD

    bluhalo,

    It's been about two years since I did that on my store, so right now I could just tell you to go to one of my products, and take a look at the source. I would say it wasn't any contribution, I added it myself, and since that was when I was just starting, I don't think it can be too hard.

    About ordering non stock items, you can configure that on your admin section, there is an option to allow (or not) checkout when some item in the cart is out of stock. I have it configured so it shows a message to my users leting them know that some item on their cart is not in stock, so they can not finish checkout. You can probably just change it so the warning says that some of their items are not in stock, so the order will be delayed until you have them, and allow them to checkout anyway.

  7. #7
    New Member
    Join Date
    Sep 2008
    Posts
    14
    Rep Power
    0


    Default Re: Help with the 'Buy it Now' <> 'Out of Stock' MOD

    Hi MindTwist

    thanks for your reply
    I have checked the 'Show Out of Stock Attributes' 'True' in admin, but out of stock products do not display
    is this the right area? configuration > product information

  8. #8
    Active Member MindTwist's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona, Spain
    Posts
    409
    Rep Power
    7


    Default Re: Help with the 'Buy it Now' <> 'Out of Stock' MOD

    Nope, I do not use attributes at all on my products, but what you are referring to is for attributes. Let's say you have a product SHIRT, with attributes RED, BLUE and PINK. If you have in stock RED and BLUE, but not PINK, I understand that if you set 'Show Out of Stock Attributes' to 'False' in admin then your customers will only see attributes RED and BLUE, but not PINK since you have no stock left.

    What I meant was in Configuration -> Stock. In there I have:

    Check stock level -> True
    Subtract stock -> True
    Allow checkout -> False
    Mark product out of stock -> ***
    Stock re-order level -> 5

    The way I have it set up, the stock on my shop is real stock, that is, they are items we have phisically in house. If we have 3 SHIRT in stock, and you add 4 SHIRT to your cart, you will not be able to finish checkout and it will give you a message that some items are not in stock, please feel free to contact us so we can give you a timeframe. That is the way I wanted it set up.

    You need to modify your store config to fit your needs. You can probably change it so it DOES allow checkout, and change the message (language files) so it says something like "items marked with *** are not in stock and will be back ordered, so your order will be shipped with a delay of about x days"

Similar Threads

  1. Low Stock Report
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 04-17-2007, 11:50 AM
  2. Maximum Stock Quantity on Stock Page?
    By Dubious in forum osCMax v2 Features Discussion
    Replies: 0
    Last Post: 08-18-2006, 02:17 PM
  3. Remove 'Buy Now' button in AABox template Search Results
    By DigitalPimp in forum osCmax v2 Installation issues
    Replies: 4
    Last Post: 09-01-2005, 07:11 AM
  4. Attributes Stock
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 5
    Last Post: 06-25-2004, 10:17 AM
  5. Broken 'Buy it Now' buttons, can you figure out why?
    By Nocturnaloner in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 06-10-2004, 05:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •