Jump to content
Sign in to follow this  
cooperman435

Stock control contrib

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

mucho apreciato

 

Its a start! were about to work on the actual addon now :-)

 

I assume it wants to be changed to stock left = $Qstock->valueint x (value we give to attribute) ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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


Rick Friedman

Lead Designer/Owner

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

How much can I pay someone to install QTPro on my OSC 2.3.3 store for me?

 

To scared to attempt it...

 

LOL

 

-Rick

Edited by AliasDesignz.com

Rick Friedman

Lead Designer/Owner

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×