Results 1 to 4 of 4

Adding a Button to the Product listing page

This is a discussion on Adding a Button to the Product listing page within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I want to add a button to the Product listing page like "More Detail" This would go to the same ...

      
  1. #1
    New Member
    Join Date
    May 2004
    Location
    Coon Rapids, MN
    Posts
    29
    Rep Power
    0


    Default Adding a Button to the Product listing page

    I want to add a button to the Product listing page like "More Detail"
    This would go to the same Product page that it would when you click the product name.

    Reason "not every body knows to click the product name to go to the product page" This way at least if the click the image "More Detail" it will show the rest of the information needed to checkout and buy the product.

    But I am not sure where to make these changes. or where to add the button.

  2. #2
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    21


    Default Re: Adding a Button to the Product listing page

    depending on which listing method you use, either
    1) product_listing.php
    or
    2) product_listing_col.php

    Both are in /includes/modules
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

  3. #3
    New Member
    Join Date
    May 2004
    Location
    Coon Rapids, MN
    Posts
    29
    Rep Power
    0


    Question Re: Adding a Button to the Product listing page

    Quote Originally Posted by met00 View Post
    depending on which listing method you use, either
    1) product_listing.php
    or
    2) product_listing_col.php

    Both are in /includes/modules
    I am not much of a programmer, but I give it a try some times.

    Do you know where in the product_listing.php I might make the changes?
    I think this file handles the product page also.

  4. #4
    New Member
    Join Date
    May 2004
    Location
    Coon Rapids, MN
    Posts
    29
    Rep Power
    0


    Default Re: Adding a Button to the Product listing page

    Quote Originally Posted by starview View Post
    I am not much of a programmer, but I give it a try some times.

    Do you know where in the product_listing.php I might make the changes?
    I think this file handles the product page also.
    I found a way to make this happen as follows:

    FIRST BACK UP All YOU FILES LISTED BELOW BEFORE YOU MAKE ANY CHANGES!!!

    This is only for people who do not use the "Buy Now" button.

    This is around about way of doing this, and if you want to rewrite the files that is your thing.
    Myself I don't know that much about programming in OsCommerce PHP.

    This adds a "View Detail" button in your product listing page.
    I have tried to use the "BUY Now" in the product listing page by activating it in the Admin page.
    But it works only if you have options for your products.
    If you don't it will add the product to your shopping cart.
    Whick I didn't want. So I maked the following changes


    File:incudes/modules/product_listing.php
    Find:
    case 'PRODUCT_LIST_BUY_NOW':
    $lc_align = 'center';
    $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>&nbsp;';
    break;
    }

    Replace it with:
    case 'PRODUCT_LIST_BUY_NOW':
    $lc_align = 'center';
    $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>&nbsp;';
    break;
    }

    File:incudes/languages/english/index.php
    Find:
    define('TABLE_HEADING_BUY_NOW', 'Buy Now');

    Change it to:
    define('TABLE_HEADING_BUY_NOW', 'View Detail');

    File:incudes/languages/english.php
    Find:
    define('IMAGE_BUTTON_BUY_NOW', 'Buy Now');

    Change it to:
    define('IMAGE_BUTTON_BUY_NOW', 'View Detail');

    Replace your includes/languages/english/images/button/button_buy_now.gif
    With any new button_buy_now.gif, keep the name the same. Mine diplays "Show Detail" as a image button.

    Now final:
    Go on to your admin page select configuation, click Product listing
    click and edit "Display Buy Now Column" with a "1" this activates this.

    Your none.

Similar Threads

  1. Buy/Add button removal if quantity = 0(for SPPC w/ Column Product Listing)
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 05-04-2007, 12:12 AM
  2. Quick stock update from the product listing page
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-20-2007, 07:50 AM
  3. Tell a Friend Button on Product Information Page
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-09-2007, 05:46 PM
  4. Product Quantity on Product Listing Page
    By vinces in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 12-10-2004, 06:32 PM
  5. Complete product listing on 1 page.
    By twinklep in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 09-29-2004, 10:06 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
  •