Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

adding an 'add to cart' button to product_listing.php


Recommended Posts

I have changed the 'Buy now' button in product_listing.php to 'more info'.

I would like to add an 'add to cart' button underneigh it so you dont have to go to product_info.php in order to add the product to the cart.

I have seen this feature on many oscommerce sites.


Any help is appreciated.

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...

The buy now column can be found in the file product_listing.php, around line 131 (find case 'PRODUCT_LIST_BUY_NOW':)


All you have to do is create the php which lets you generate the 'more info' link and add it before the existing code (as well as a < br> to separate the more info and buy now links.

Link to comment
Share on other sites

Thanks but that's part of the question I had as well how to generate the Add to Cart with the proper product_id attached to it. Might you have a sample code to show us.



Thanks Again

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...