Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Stock control contrib


cooperman435

Recommended Posts

Ive been trying to adjust the way my stock is controlled with poor results.

 

I ideally need to remove differing amounts of stock per sale by the attributes that are selected for that product.

 

currently I have "add weights to attributes" working on my shop which allows an actual packing weight to be given per attribute and added up to total the parcel weight

 

I need to remove not one but differing amounts from stock as products are sold by weight which is selected from the options of attributes. a product could be sold as 200g or 1kg (the attribute set for that product) but currently one is always removed from stock.

 

Can anyone please give me a starting point as to how stock is currently removed and which files are associated with it.

 

I am thinking that using the "add weight to attributes" contrib as a starting point to modify we could add a "stock" value box to attributes which would then replace the value 1 which is removed from stock now.

 

Im picking up PHP at a fast pace but need assistance where to start.

 

PLEASE can someone give me some ideas how they would handle this issue?

Link to comment
Share on other sites

Ive been trying to adjust the way my stock is controlled with poor results.

 

I ideally need to remove differing amounts of stock per sale by the attributes that are selected for that product.

 

currently I have "add weights to attributes" working on my shop which allows an actual packing weight to be given per attribute and added up to total the parcel weight

 

I need to remove not one but differing amounts from stock as products are sold by weight which is selected from the options of attributes. a product could be sold as 200g or 1kg (the attribute set for that product) but currently one is always removed from stock.

 

Can anyone please give me a starting point as to how stock is currently removed and which files are associated with it.

 

I am thinking that using the "add weight to attributes" contrib as a starting point to modify we could add a "stock" value box to attributes which would then replace the value 1 which is removed from stock now.

 

Im picking up PHP at a fast pace but need assistance where to start.

 

PLEASE can someone give me some ideas how they would handle this issue?

 

Hi,

 

Look at catalog/includes/classes/orders.php

 

start with

 	if ($Qstock->numberOfRows() > 0) {
	$stock_left = $Qstock->valueInt('products_quantity');
.
.
.

 

Here you can handle the stocks with if-case attibutes.

 

Use the orders class.

 

Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

  • 4 months later...

We have gotten a little further with this contrib now but due to our combined lack of full PHP understanding were not entirely sure where to make the next step, if anyone with a better grasp would please input some wisdom we would really appreciate it now?

 

We have successfully now added our new section for attributes along with its DB entry which is like the existing weight attribute in the PRODUCTS under stock435

 

we believe the actual point where the stock is removed is run through the checkout_process.php file (but please correct us if wrong)

 

in this file is a section which deals with stock removal at the point of checkout and if the - symbol is changed for + stock is now added, change it to * and stock is multiplied by the quantity purchased, also replacing the reference to stock quantity with a set amount (99) for example and this quantity is removed, added or multiplied when checking out.

 

We are hoping that simply referencing the new DB entry as a quantity to multiply the quantity of items being purchased by will result in the desired effect but Im told we are also struggling because we must first reference the DB entry?

 

Also as ideally the stock checking system will still ensure stock is available before purchase we are considering that this additional code may have to be entered earlier in the checkout or cart filling procedure as well as in the checkout or instead of.

 

If anyone could please say if they would have a better idea than us about this actual part of OsCommerce we would really appreciate it please.

Link to comment
Share on other sites

  • 1 year later...

I am so tired of searching and reading add-ons and what they do and dont... My eyes are so tired... Hoping for some rock solid help... I have this store setup for a client that sells heated clothing and accessories and I pretty much done except one little glitch... And from what I have been reading, this issue is not a new one. I just dont know or can't figure out the best way of tackling it and I am hoping for your help! He sells a jacket and the sizes are XSmall, Small, Medium, Large, XLarge and 2XLarge. How can I setup the individual stock/quantity amounts for each one? For right now I can only set the stock/quantity amount for the jacket but need to break it out to setup amounts for each size.

 

Your help is so appreciated, you have no idea!!

 

-Rick from Jersey

Rick Friedman

Lead Designer/Owner

Link to comment
Share on other sites

I am so tired of searching and reading add-ons and what they do and dont... My eyes are so tired... Hoping for some rock solid help... I have this store setup for a client that sells heated clothing and accessories and I pretty much done except one little glitch... And from what I have been reading, this issue is not a new one. I just dont know or can't figure out the best way of tackling it and I am hoping for your help! He sells a jacket and the sizes are XSmall, Small, Medium, Large, XLarge and 2XLarge. How can I setup the individual stock/quantity amounts for each one? For right now I can only set the stock/quantity amount for the jacket but need to break it out to setup amounts for each size.

 

Your help is so appreciated, you have no idea!!

 

-Rick from Jersey

 

QTPro

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

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

Guest
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...