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

Buy It Now

This is a discussion on Buy It Now within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Heya peeps! Was just wondering if there is any way to hide the Buy It Now Button in sold out ...

      
  1. #1
    New Member
    Join Date
    Nov 2005
    Posts
    7
    Rep Power
    0


    Default Buy It Now

    Heya peeps! Was just wondering if there is any way to hide the Buy It Now Button in sold out products and the products yet to come. I want my customers to be able to see the products but not be able to add them to the cart..... I realise that these items can't be purchased anyway but it would be so much neater if I could just get rid of the button on certain items.... Thanks guys
    please don't leave me hanging!!!!

  2. #2
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default RE: Buy It Now

    this would be fantastic. Any pointers, I'll look into the code if I just get a few tips.

  3. #3
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default RE: Buy It Now

    the button for the 'add to cart' is:

    Code:
    <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>
    You'll need to do an if statement in php wherever that button is, I don't know the proper syntax, but it'd be something like:

    if [quantity.product()>0){
    <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>
    }

    I don't know PHP very well, and don't feel like looking in my ref books for the code, but you get the idea.

  4. #4
    New Member
    Join Date
    Nov 2005
    Posts
    7
    Rep Power
    0


    Default Almost there...

    Ok. Thats cool. I'm a little confused about where this text is changed though. Is it in product_listing or content? Tried doing an if statement beofre successfully but couldn't get this partuicular thing to work because I don't know where it needs to go. Thanks for your help though!!!

    Rob
    www.adoptafurby.com/catalog

  5. #5
    Active Member
    Join Date
    Oct 2004
    Posts
    215
    Rep Power
    8


    Default RE: Almost there...

    Where it is depends on what template you are using. For my case, it was in 'template/fallback/content/product_info.tpl.php ' But needless to say, it was in the template directory. I can't recommend dreamweaver 8 enough for doing this, it handles CSS wonderfully. Just make sure to sync your local site to your remote site and your life will be easy. It'll do a site-wide code check fast!

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
  •