Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
MikeyG
Just to pick up on your post quoting tombooth01 - I have been looking for the code to get it to show out of stock in the drop down(does not have to delete the option just flag it as out of stock) but I could not see that functionality.
Is it really there or do you no what has been suggested to make it work?
Yes, the functionality appears to be there.
In trying to get this to work I spent some time going through the code and the functionality to specifically append the phrase 'OUT OF STOCK' to option names seems to exist in the _build_attributes_combinations() function within /shop/includes/classes/pad_base.php:
Code:
if (!$is_out_of_stock | ($showoos == true)) {
switch ($markoos) {
case 'Left': $newtext=($is_out_of_stock ? TEXT_OUT_OF_STOCK.' - ' : '').substr($newtext,2);
break;
case 'Right': $newtext=substr($newtext,2).($is_out_of_stock ? ' - '.TEXT_OUT_OF_STOCK : '');
break;
default: $newtext=substr($newtext,2);
break;
}
After a week I gave up and decided to see if anyone on here had managed to get it to work.
It did appear to nearly work (i.e it appended OOS to the correct options in the $combinations array but it appears the actual dropdown is populated by the $attributes array) but I became stuck as I`m new to Zencart.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Here is a link to a post in a thread called only: "Stock By Attributes" rather than this thread called: "Stock by Attribute v4.0 for Zen Cart 1.3.5+"
I think some of us have gotten lost in there but this post is significant - I just haven't had time to try it yet:
location: Post by limelites
Quote:
Originally Posted by
limelites
Ahaaaaaaa, figured this one out guys!!
For anyone else having a problem with this issue, just look at re-installing the files that shipped with the stock_by_attributes mod.
I've just cured my problems by overwriting /includes/classes/order.php with the order.php from "stock_by_attributes_4-7MULTIADD mod"
Somehow some other mod had corrupted the data that updates the "Quantity in Stock" in ADMIN>CATALOG>PRODUCTS WITH ATTRIBUTES".
It is now updating the Quantity in Stock Column with each sale. All working perfectly now.
Additionally, if you want the attribute in the drop down menu to automatically disable when the attribute quantity = zero, then you have to open /includes/modules/attributes.php and replace this:
PHP Code:
$sql = "select pov.products_options_values_id,
pov.products_options_values_name,
pa.*
from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov
where pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
with this:
PHP Code:
$sql= "SELECT pov.products_options_values_id,
pov.products_options_values_name,
pa.*,
pwas.*
FROM " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas ON pwas.stock_attributes = pa.products_attributes_id
WHERE pa.products_id = '" . (int)$_GET['products_id'] . "'
and pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
and (pwas.quantity > 0 or pwas.quantity IS NULL)
and pa.options_values_id = pov.products_options_values_id
and pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
$order_by;
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
athena
Here is a link to a post in a thread called only: "Stock By Attributes" rather than this thread called: "Stock by Attribute v4.0 for Zen Cart 1.3.5+"
I think some of us have gotten lost in there but this post is significant - I just haven't had time to try it yet:
location:
Post by limelites
I had come across that previously in my investigations but when I tried to implement it made no difference. I`ve just tried it again and nothing changes.
Has no-one else had this issue (out of stock options appearing in the dropdown) with this addon (stock by attributes)?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
I installed the stock by attribute mod, but for some reason it's not showing the attribute for people to pick there size Example:
I have a dress with the sizes: Small, Medium & Large, but on the product page I'm not able to pick the sizes.
How can I correct this issue?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
divaboutiques
I installed the stock by attribute mod, but for some reason it's not showing the attribute for people to pick there size Example:
I have a dress with the sizes: Small, Medium & Large, but on the product page I'm not able to pick the sizes.
How can I correct this issue?
Same problem here.
I installed stock_by_attributes_1.4.13
I want to know please how to put an table on each product page for my customers to choose the width, color, height ?
To know what i`m talking about, here I put an picture with the table that I want to add : http://s3.postimage.org/62uwm416x/image.jpg
Many thanks fot thoose who helping me!
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Installed 1.4.13 and resynced quantities and it took the stock quantities of the main product to zero throughout the entire cart. If you have used this version and not had any problems with the quantity sync please let me know! If this is typical of this version, it has a major problem!
I checked the entire install to make sure the files are the correct ones and the database is okay.
One other oddity is that there is a save button on the page - that has no function and wasn't there in the last version I used.
The only improvement I see is that the shopping cart now shows the quantity numbers next to the product. That was my only problem with this mod before and I think the last version I used was 1.4.10.
Right now I'm just trying to get a working version of this installed for a client on their sites. Which version?
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Just updated from 4.7 to 4.13.
But now I get the following error when I try to access SBA:
1054 Unknown column 'sort' in 'order clause'
in:
[select * from products_with_attributes_stock where products_id="530" order by sort ASC;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
In the webshop the attributes still show.
Running ZC 1.3.8a
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
ferid
Just updated from 4.7 to 4.13.
But now I get the following error when I try to access SBA:
1054 Unknown column 'sort' in 'order clause'
in:
[select * from products_with_attributes_stock where products_id="530" order by sort ASC;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
In the webshop the attributes still show.
Running ZC 1.3.8a
When I click sort, I get the error:
1054 Unknown column 'sort' in 'field list'
in:
[UPDATE products_with_attributes_stock set sort = '0' WHERE stock_id = '152' LIMIT 1;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
I havn't made any changes to the database. Only copied the files.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
There are 2 separate sql updates if you are coming from that old a version. One is included in the package and the other is to add the sort feature to the attributes table. That update is in version 4.1.11 which I haven't downloaded.
Re: Stock by Attribute v4.0 for Zen Cart 1.3.5+
Quote:
Originally Posted by
delia
There are 2 separate sql updates if you are coming from that old a version. One is included in the package and the other is to add the sort feature to the attributes table. That update is in version 4.1.11 which I haven't downloaded.
Thank you for your reply.
Bot the 4.1.11 and .13 contain the same sql update: update_1_4_10.sql. I need to run this sql? Because I understood from the readme I only had to replace the files and no sql update. But maybe I didn't read it correctly..