Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Modifying product quantity


BlueByYou

Recommended Posts

I have been messing with my osCommerce shop and im trying to figure out if there is an easy way to modify the product quantity to display Available or Out of stock. So basically the code would say something like, if stock = >0 than Available. Or if stock = <0 than Out of stock. Im am looking to put this on the product_info page if that helps. If anyone can help me please let me know as soon as possible, this is driving me nuts that I cant figure it out. Thanks to everyone in advance, osCommerce is the best eCommerce software out there!

 

Michael

Link to comment
Share on other sites

I have been messing with my osCommerce shop and im trying to figure out if there is an easy way to modify the product quantity to display Available or Out of stock.  So basically the code would say something like, if stock = >0 than Available.  Or if stock = <0 than Out of stock.  Im am looking to put this on the product_info page if that helps.  If anyone can help me please let me know as soon as possible, this is driving me nuts that I cant figure it out.  Thanks to everyone in advance, osCommerce is the best eCommerce software out there!

 

Michael

 

Hello,

 

I think you have the basic concept, at least the way that I might approach it. Just query the database for the value you are looking for, taking a look at the other code in the file for an example on how to do it. Then again looking at the code for examples on how to display it. You might have to play with the layout a little to get it all exactly where you want it. Most important of all, make sure you do a back up of the file before you change anything.

 

Regards,

 

Tina

If you're not having fun you're not doing it right

 

Teach a person to fish rather than give them a loaf of bread or however that saying goes.

Link to comment
Share on other sites

There is a backorders contribution which will let you set stock messages, but with the way it's set up currently, you have to go into the catalog product page to set the message -- it doesn't automatically change message based on stock. You can see it in action on my site:

 

http://www.kididdles.com/catalog

 

Most of the products are in stock, but if you do a search for Disney Silly Songs CD, you'll see one backordered message.

 

HTH,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Thanks guys, I was trying to create something so complicated my mind would not allow me to see the relatively easy code that was needed. All I did was add a little script saying if stock=0 than 'Not in Stock' or if stock=>0 than 'In stock Now!'. I absolutely love this software! =P

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...