osHelpers - Help for your osCommerce store
 
Google Base Feed Germany
iFrame Defender v1.2
oscommerce Seo
  Seo Pack 2
  SE Friendly URLs
  Session ID Removal
  Title and Meta Tags
  Google Sitemap
Magnum Shopping Cart
  Magnum MVS 8.4 Basic
osCommerce Services
  osc / cre patch
  Data Entry
  Data Extraction
  bugs and fixing
  Site Transfer
  creloaded Transfer
  Design Special
  Hosting
osCommerce Templates
osCommerce Contributions
  Credit Modules
  Features
  Images
  InfoBoxes
  Languages
  Order Total Modules
  Other
  Payment Modules
  Reports
  Shipping Modules
  Templates/Themes
  Zones
osCommerce Articles
osCommerce Tutorials
  Installing osCommerce
  Configuring your store
  Adding categories
  Adding products
  Adding product attributes
  Configuring currency
  Adding payment modules
  Adding shipping modules
  Configuring sales tax
  Editing your home page
  Editing columns
  Editing header and footer
  Creating specials
  Managing customers
  Sending out a newsletter
  Sending out email
  Managing your banners
  Backup database
CRELoaded Tutorials
  Add Administrators
  Add Article Author
  Additional Images
  Create a New Page
  Define Mainpage
  Disable cc Encryption
  Disable Company Field
  Disable Country
  Disable Date of Birth
  Display broken images
  Easypopulate Export
  Email confirmation
  Insert Faq
  Max Package Weight
  Require Terms of Use
  Affiliate Newsletter
  Enable Cache
CB Power Affiliate
Tell A Friend
 

Tell someone you know about this product.

   OSHELPERS | OSCOMMERCE CONTRIBUTIONS | FEATURES | 4206   


oscommerce GetNextAvailableModelNumber
[4206]
 
 
box_bg_l.gif.
"We run our Model Numbers as the Vendors Model Number and then we have added a field for our in-store SKU number. This SKU number is a simple sequential 5 digit number. We ran into the problem that with having too many people working in the database at the same time, there was not an easy way to keep track of the next number. This left holes and duplications. I tried the automatic numbering contribution where it gave the numbers based on their auto_increment value in the database, but that made tagging the items harder. This was my solution; simply put a number next to the SKU field that would tell us the next available number.

This code will put a message on the right side of your text box (Model Number, or any other field you want) that says “Next Available Number: xxxxx”

This will actually find the next missing number in the field. Not just give you the highest number. This is also good for reusing numbers as products are deleted.

Requirements: Your products_model (or in our case products_code) field must be of type int. And a good backup."

 


For more information, visit the official osCommerce contribution webpage.
box_bg_r.gif.
 

osHelpers

osHelpers