Results 1 to 8 of 8

I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

This is a discussion on I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page? within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hey guys.... i have been searching the forums here for awhile and have not found an easy way of getting ...

      
  1. #1
    New Member
    Join Date
    Aug 2009
    Posts
    5
    Rep Power
    0


    Default I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    Hey guys.... i have been searching the forums here for awhile and have not found an easy way of getting "Add to Cart" or "Buy Now" to display on the products in the main home page like they do when you browse in the categories. Maybe someone knows how to do this or has a thread that has already explained it..

    BTW im am using OSCMax 2.0.3

    Chris

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,428
    Rep Power
    48


    Smile Re: I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    lithband,

    When you say on the "main home page" - do you mean in the specials and new products for x month boxes? If so you can copy the link code from also_purchased file - change the query string in [ ]s to the one from the infobox in question ...

    If this doesn't make sense - post back and I will see if I can dig out the exact code for you.

    Regards,
    pgmarshall
    _______________________________

  3. #3
    Member
    Join Date
    Aug 2009
    Posts
    32
    Rep Power
    0


    Default Re: I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    Quote Originally Posted by lithband View Post
    Hey guys.... i have been searching the forums here for awhile and have not found an easy way of getting "Add to Cart" or "Buy Now" to display on the products in the main home page like they do when you browse in the categories. Maybe someone knows how to do this or has a thread that has already explained it..

    BTW im am using OSCMax 2.0.3

    Chris
    If you just want to move products to that page, just copy the category picture and BUY button and paste the code into the home page, like this,
    www.glendacasongallery.com
    You may want to remove the session code. Good luck.

  4. #4
    New Member
    Join Date
    Aug 2009
    Posts
    5
    Rep Power
    0


    Default Re: I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    Hey thanks for the reply's! On my index page i have changed the specials and new products to pull random products from my store.
    Replace New Products with Random Products on the index page

    BUT what i am needing on the index page is for each products to display a buynow or add to cart button. Currently it just has Picture - Link(Title)- Price..... I would like an add to cart below the price much like how they are displayed in the "categories" when browsing through them

  5. #5
    New Member
    Join Date
    Aug 2009
    Posts
    5
    Rep Power
    0


    Default Re: I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    Hey guys sorry for the delay. I posted a replay a few days ago but for some reason it did not post- Here is basically what it said-

    I am looking to add Buy now or add to cart button on my MAIN homepage to the products. I have update the front end of the script with this-
    Replace New Products with Random Products on the index page

    So instead of showing "new Products" and specials it shows a random set of products.

    Right now the products on the index page are displayed like this-
    Image
    Products Name
    Price

    I would like them to be-
    Image
    Products Name
    Price
    Buy Now or Add to cart button(like how they are when browsing through the categories)

    Im just not sure what file to edit or what code to add...

    Thanks everyone

  6. #6
    New Member
    Join Date
    Aug 2009
    Posts
    5
    Rep Power
    0


    Default Re: I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    anyone have any ideas?

  7. #7
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,428
    Rep Power
    48


    Default Re: I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    You need to edit includes/modules/new_products.php and default_specials.php.

    This does feed back to a point I have made in other threads a few times - I find it strange that both the new_products and specials uses totally different code from the product_listing_cols.php.

    Anyway - these are files you need to edit ... I tried to do it myself to test out but I am unable to add anything to the end of to the $box_content[$row][$col] without it crashing ...

    NOt sure what I am doing wrong ... I will have another go tomorrow.

    Regards,
    pgmarshall
    _______________________________

  8. #8
    Lurker
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0


    Default Re: I Need "Add to Cart" or "Buy Now" Buttons on Main Home Page?

    Open the file catalog/includes/modules/new_products.php
    go to the line

    $box_content[$row][$col] = array(

    go to 'text' =>
    and just add the following line , the place where you need to get the 'Buy Now' button

    "<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products[$x]["products_id"]) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>"

Similar Threads

  1. Hide "Add to Cart" and disable "Buy Now" for manufacturer v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 10-31-2008, 03:03 AM
  2. Hide "Add to Cart" and disable "Buy Now" for manufacturer v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 10-30-2008, 10:55 PM
  3. Need "HOME" button on each page.
    By lwilliams114 in forum osCmax v2 Customization/Mods
    Replies: 8
    Last Post: 05-14-2008, 01:24 PM
  4. "Price" and "Add to Cart" button inside
    By midwestwebsites in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 11-14-2005, 05:13 AM
  5. Define main page error - "file not writeable"
    By mark754 in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 01-16-2004, 10:18 AM

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
  •