Sorry posted the wrong thread.
Sorry posted the wrong thread.
Using Zen Cart 1.5.1
Greetings.
I'm currently using:
Zen-Cart 1.5.1
Stock By Attributes (SBA) Version 1.5.3
After adding new products to the database, I can run the "Optional SQL" script and it creates entries in the new products_with_attributes_stock table, based on current products that have attributes associated with them. This seems to work correctly.
What I would like to do at this point is use the SBA "Export Table Data" script to export the SBA table data, enter the Unique ID and stock values for each variant, then import that data using the "Import Table Data" script.
The problem I'm having is that when I run the "Export Table Data" script, the script is exporting data from old products that were previously in the table/database, but have now been deleted from Zen-Cart.
How can I ensure the data that gets exported only contains the current products in Zen-Cart and not old products that have been discontinued and deleted from Zen-Cart? Is there a step I'm missiing that syncs the SBA table data to the current products list in Zen-Cart?
There must be a way to do this because products can be discontinued at anytime.
Thanks for any help that can be given!
Tuxy
More information that might be helpfull..
When I click the menu option "Catalog/Products With Attributes Stock", it displays the products correctly. It displays all the products that have an attribute associated with them.
I assumed that running the "Export Table Data" script from the "Configuration/Products With Attributes Setup" menu, I would get the same list as I do from the "Catalog/Products With Attributes Stock" menu, but that is not the case. When I Export Table Data, I get old products that have been deleted from the Zen-Cart database.
Does this make sense? Is anyone else using the Export/Import feature of this module?
Is this the correct place to be asking this question?
Thanks!
I just discovered this module is being developed on GitHub. I'll take this issue there for further discussion.
I am currently using ZenCart Version 1.5.3 and I uploaded everything up to the site now my admin is white nothing. Plus when I tried to install the SQL file I keep getting errors. Why?
I'm using the latest version of this module. 'SBA Display Custom ID > Display the Custom ID value in history, checkout, and order forms' is set to true. Setting this to true also shows the custom ID on the product info pages beside each attribute, which I don't want. What the best way to hide the custom ID on the product info pages?
Just a suggested edit, not sure if it was suggested. I kept trying to add quantities of 0 using the "Add Quantity for Product Variant" link on the SBA Page in the admin area. Each time I chose to add 0, I got an error. "Missing or bad quantity." This may be because 0 is registered as null when it is run against line 216's:
So I changed that to the following:Code:elseif( !is_numeric((int)$quantity) || is_null($quantity) ){
and that fixed my problem of being able to add a product with zero quantity using the wizard.Code:elseif( !is_numeric((int)$quantity) || zen_not_null($quantity) ){
Honestly, looking at that snippet of code alone, it doesn't make sense. If the variable that is type cast to be an integer isn't a number or (as originally written) the value is actully null then do the next step.
Now it reads if the variable that is type cast to be an integer isn't a number or the value is actually NOT null then do the next step. It seems as if that section is meant to address situations that do not add value to the process. Why is it important to add a zero value for an attribute quantity that does not exist? That's basically what is being done.
If it is desired to avoid going down the path of the value zero resolving to null then the more specific solution would be:
If (!is_numeric((int)$quantity) || (is_null($quantity) && $quantity !== 0)) {
Note the use of the not identity instead of evaluating against something thatmay be equivalent to zero. (Ie. False).
3000
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I'm sorry if this has been asked and answered, but it is impossible to search through a particular thread.
Based on an attribute, you can change the image associated with that attribute, but I can find no way/reference to a way to change the text of the description based on an attribute. Is this already in there and I missed it or has this already been answered in this thread? I have a customer that is rather insistant that I make this possible even though when I took on this customer I explained my lack of knowledge of PHP which Zen Cart is written with. Perforce, I am learning slowly, but, she wants it NOW (isn't that always the way?).
Mal
Bookmarks