Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I found posts stating that these types of issues are usually due to either:
- files not being correctly uploaded, or
- leaving old files on the server.
I compared the modified files from the SbA v4.7a with what I had on the server and found a couple of discrepancies between them. The discrepancies weren't in any of the code that was marked as part of the SbA edits, but none the less when I corrected those discrepancies the store is no longer allowing me to check out with items that are out of stock. :clap:
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
poosk
I tried to search but couldn't find a clear answer. Is there a step by step guide how to install this mod?
Its still great plugin but I just don't need it with our current setup. Thanks!
I MEANT TO SAY UNINSTALL! Please advice!
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
poosk
I MEANT TO SAY UNINSTALL! Please advice!
No step by step or uninstall.. You will have to go through and manually reverse everything (SQL entries, and remove SBA specific files..)
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hi
I have had a requirement to create a custom column within the products_with_attributes_stock so that stock level could be automatically updated based on my suppliers product codes.
What I need to do now is to incorporate something that populates this column when adding quantities to variants.
Its very simple really, my codes are always just a number, my suppliers are this number plus a letter on the end Dependant on the size, for example:
1000 would be my code so in the modified table there would be:
stock_id products_id stock_attributes quantity suppier_id
6 1 7 12 1000S
where product id 1's model id is 1000
stock_attributes 7 = small
thus creating 1000S
I see in the products_with_attributes_stock.php file the query is:
PHP Code:
$query = 'insert into `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` (`products_id`,`stock_attributes`,`quantity`) values ('.$products_id.',"'.$attributes.'",'.$quantity.')';
So I would need something like this:
PHP Code:
$query = 'insert into `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` (`products_id`,`stock_attributes`,`quantity`,`supplier_id`) values ('.$products_id.',"'.$attributes.'",'.$quantity.','.$supplier_id.')';
to obtain the variable $supplier_id I need two variables
The first being the model_id - easy enough as it can be taken from the products_id already obtained for the page
The second is the option_value_id based on the section made in the form.
From these I can run an if string to get the $supplier_id value - a bit like this:
PHP Code:
if ($options_value_id == 4){
$supplier_id = $product_model.'S';
}
if ($options_value_id == 5){
$fullprodid = $product_model.'M';
}
if ($options_value_id == 6){
$fullprodid = $product_model.'L';
}
if ($options_value_id == 7){
$fullprodid = $product_model.'XL';
}
I am having trouble working out where I need to call the values etc. If anyone is willing to give me pointers I would very much appreciate it :o)
Cheers,
Phil
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
philip937
Hi
I have had a requirement to create a custom column within the products_with_attributes_stock so that stock level could be automatically updated based on my suppliers product codes.
What I need to do now is to incorporate something that populates this column when adding quantities to variants.
Its very simple really, my codes are always just a number, my suppliers are this number plus a letter on the end Dependant on the size, for example:
1000 would be my code so in the modified table there would be:
stock_id products_id stock_attributes quantity suppier_id
6 1 7 12 1000S
where product id 1's model id is 1000
stock_attributes 7 = small
thus creating 1000S
I see in the products_with_attributes_stock.php file the query is:
PHP Code:
$query = 'insert into `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` (`products_id`,`stock_attributes`,`quantity`) values ('.$products_id.',"'.$attributes.'",'.$quantity.')';
So I would need something like this:
PHP Code:
$query = 'insert into `'.TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK.'` (`products_id`,`stock_attributes`,`quantity`,`supplier_id`) values ('.$products_id.',"'.$attributes.'",'.$quantity.','.$supplier_id.')';
to obtain the variable $supplier_id I need two variables
The first being the model_id - easy enough as it can be taken from the products_id already obtained for the page
The second is the option_value_id based on the section made in the form.
From these I can run an if string to get the $supplier_id value - a bit like this:
PHP Code:
if ($options_value_id == 4){
$supplier_id = $product_model.'S';
}
if ($options_value_id == 5){
$fullprodid = $product_model.'M';
}
if ($options_value_id == 6){
$fullprodid = $product_model.'L';
}
if ($options_value_id == 7){
$fullprodid = $product_model.'XL';
}
I am having trouble working out where I need to call the values etc. If anyone is willing to give me pointers I would very much appreciate it :o)
Cheers,
Phil
my bad that should have been:
PHP Code:
if ($options_value_id == 4){
$supplier_id = $product_model.'S';
}
if ($options_value_id == 5){
$supplier_id = $product_model.'M';
}
if ($options_value_id == 6){
$supplier_id = $product_model.'L';
}
if ($options_value_id == 7){
$supplier_id = $product_model.'XL';
}
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
kuroi
@gsdcypher, If you're using the current version, 4.7, then running the following SQL should neuter itYou may wish to also replace the files mentioned in the installation documentation with their originals from the release package of the Zen Cart version that you have installed, but that shouldn't be necessary.
@greenraingraphics, installing won't help you as your problem has nothing to Stock by Attributes. See post #405.
Kuroi I ran the sql command you advised in order to uninstall but I broke the whole cart down!
1146 Table '****_products_with_attributes_stock' doesn't exist
in:
[select pov.products_options_values_id, pov.products_options_values_name, pwas.quantity, pa.* from ****_products_attributes pa, ****_products_options_values pov, ****_products_with_attributes_stock pwas where pa.products_id = '318' and pa.options_id = '2' and pa.options_values_id = pov.products_options_values_id and pwas.stock_attributes = pa.products_attributes_id and pov.language_id = '1' order by LPAD(pa.products_options_sort_order,11,"0"), pov.products_options_values_name]
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
kuroi
@gsdcypher, If you're using the current version, 4.7, then running the following SQL should neuter itYou may wish to also replace the files mentioned in the installation documentation with their originals from the release package of the Zen Cart version that you have installed, but that shouldn't be necessary.
@greenraingraphics, installing won't help you as your problem has nothing to Stock by Attributes. See post #405.
Quote:
Originally Posted by
poosk
Kuroi I ran the sql command you advised in order to uninstall but I broke the whole cart down!
1146 Table '****_products_with_attributes_stock' doesn't exist
in:
[select pov.products_options_values_id, pov.products_options_values_name, pwas.quantity, pa.* from ****_products_attributes pa, ****_products_options_values pov, ****_products_with_attributes_stock pwas where pa.products_id = '318' and pa.options_id = '2' and pa.options_values_id = pov.products_options_values_id and pwas.stock_attributes = pa.products_attributes_id and pov.language_id = '1' order by LPAD(pa.products_options_sort_order,11,"0"), pov.products_options_values_name]
Ok found it :) There was a file called attributes from probably older version in modules folder...
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hello guys,
I wonder is that possible to create a link that shows only products that are INSTOCK.
** I would like to remain out of stock items in my catalog, but i wish to have an additional link to show ONLY INSTOCK items**
Help is appreciated.
Thanks so much!
Regards,
June
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Hi zenners!
I took over a client's shopping cart (v1.3.8) about 6 months ago. It has the stock by attributes add-on. I recently added new SKUs and the USPS shipping module seems to be out of whack because of the new SKUs (and only new SKUs) and their attributes with stock. Out of whack meaning that the shipping estimates are outrageously expensive.
These rates are only with the new items and not the old. I have made sure that the new items have correct weights to price out shipping, but I am stumped. :frusty: I am 80% sure that it has something to do with stock by attributes because this is not happening on the old items.
www.innerwaves.org
Thank you,
Michelle Carbone
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
mcarbone
Hi zenners!
I took over a client's shopping cart (v1.3.8) about 6 months ago. It has the stock by attributes add-on. I recently added new SKUs and the USPS shipping module seems to be out of whack because of the new SKUs (and only new SKUs) and their attributes with stock. Out of whack meaning that the shipping estimates are outrageously expensive.
These rates are only with the new items and not the old. I have made sure that the new items have correct weights to price out shipping, but I am stumped. :frusty: I am 80% sure that it has something to do with stock by attributes because this is not happening on the old items.
www.innerwaves.org
Thank you,
Michelle Carbone
SBA would not affect shipping rates in anyway. However if you have product attributes which have weight differentials (which would be are added on to the overall product weight), then that might be the source of your shipping calculation issue. (see screeshot attached) If this is the case, this is NOT an SBA issue, but simply something you need to correct in the way your products and attributes are set up.