Zen Cart Logo
Forums / All Other Contributions/Addons / Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Views: 658,353

Results 2,381 to 2,400 of 3,609
31 Dec 2015, 21:10
#2381
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Well, I started this once and dunno' what happened, but lost my writeup...

So actually was saying that if want the javascript actions using the software that is provided by this plugin, then set Dynamic dropdowns to display with multiple attributes only, then for multiple attributes in the DD menu select the option that has sba in t (default). For single attrbute product, to show the out-of-stock notification select the option name type that also has sba in it's name (would be the sixth available in a vanilla install).

I'm getting the best results with sba_sequenced_dropdowns for both Single and Multiple Attributes. For single attribute products, trying to add more than the available quantity adds zero to the cart without it. With it, it adds as many to the cart as inventory will support. If it would show single-attribute quantities, my week would be made, it would remove the jarring effect of jumping to shopping cart to be told there is no inventory.

Thing is that in the last couple of hours with some more testing it looks like I still have an issue with text and upload filename boxes... I'm trying to work around it without modifying any other core code sections and also to keep things going. Issue seen at the moment is if a variant is populated with an attribute and a text field, nothing is added to the text, then when adding the product to the cart, the maximum to add is whatever is assigned in the sba table, good. But with necessary corrections made to functions_lookups, now while in the cart, the product appears to be out-of-stock because the cart functionality removed the attrbute designation for the text block because it was blank... So there's one piece not trying to modfy. Okay, so was able to do a sort of validation to make that go away, but then when adding the same product to the cart again this time with something in the text field, again the product can inaccurately be added to the cart to the maximum assigned in the sba table... No good...

Have a couple of thoughts, but am not happy with the current condition because I thought I had resolved the text issue... It does appear that the above is like adding mixed quantities of a product with the goal to be that the total does not exceed the sba table quantity... I know that currently sba doesn't deal with mixed quantities like the zc store does, is something to consider addressing later, but need to look at how to handle this issue and how zc handles adding two product each with text boxes but one filled in the other not or filled in differently...

I'm not much help for text or uploads. Thankfully, all of our products are predetermined attributes. If we weren't so slammed for our imminent release, I'd gladly help you with testing that part.

(note that we're leapfrogging each other, each composing a post at the same time)
Just updated it. Interesting results:

DYNAMIC DROPDOWNS
Enable Dynamic Dropdowns 2 (On for Multi-Attribute Only)
Product Info Single Attribute Display Plugin single_dropdown
Show Out of Stock Attributes True
Product Info Multiple Attribute Display Plugin sba_sequenced_dropdowns
Mark Out of Stock Attributes Right
Display Out of Stock Message Line True
Prevent Adding Out of Stock to Cart True
SBA Number of Records to Displayed 25

STOCK
Allow Checkout false
SBA Show Available Stock Level in Cart (when less than order) true
SBA Display Attributes Images false
SBA Display Custom ID true
SBA Display Search List Box true
SBA Display Images in Admin true
SBA Show Stock Level on Product Info Page true
SBA Original Price Struck Through true
SBA Display Search Box Only

PRODUCT 1 (one of our "toughest"):
Two Attributes, Not a "full grid" of size and color:
30ml
Red 5 in stock
Orange 0 in stock
Yellow 4 in stock
Green Not Offered (and not SBA tracked)
Blue Not Offered (and not SBA tracked)

15ml
Red Not Offered (and not SBA tracked)
Orange Not Offered (and not SBA tracked)
Yellow Not Offered (and not SBA tracked)
Green 0 in stock
Blue 0 in stock

The first attribute (size) now shows
15ml - Out of stock
30ml - (+$8.00) YAY!!!

Selecting 15ml gives a Java alert that all options are out of stock YAY!!!

Upon selecting 30ml, the second attribute (color) shows
Red Qty: 5
Orange greyed out and shows Out of Stock
Yellow Qty: 4
Green greyed out and shows Out of Stock
Blue greyed out and shows Out of Stock YAY!!!

It allows me to add up to 4 30ml/Yellow with just the "added to cart" notice YAY!!! Clicking to add 5 results in only 4 added. YAY!!! Dropdown doesn't update quantity available, so makes me think I can add 4 more, but doesn't allow me to add any more to the cart. I see the balancing act here, definitely hard to tell what's the best strategy, and there's no way to accommodate all preferences...Inventory could be eternally blocked by a shopping cart that doesn't make it to checkout and is overlooked by manual housekeeping. Customers will wind up having their cart contents change during checkout, based on who checks out first.

PRODUCT 2 (should be easiest):
Black 0 in stock
Blue 2 in stock
Grey 0 in stock
Red 2 in stock

Selecting Black or Grey: Does not add show out of stock, does not add to cart, but pushes the customer to the cart page
Selecting Blue...
Qty 1 or 2: Adds 1 or 2 to the cart
Qty 3+: Adds nothing to the cart and pushes the customer to the cart (STOCK => SBA Show Available Stock Level in Cart looks broken here)

CHANGING DYNAMIC DROPDOWNS TO
Enable Dynamic Dropdowns 1 (On for All SBA Tracked)
Product Info Single Attribute Display Plugin sba_sequenced_dropdowns

Product 1 behavior does not change YAY!!!

Using Product 2:
Does not show Available Stock or Out of Stock
Selecting Black or Grey: Does not add to cart, pushes the customer to the cart page
Selecting Blue...
Qty 1 or 2: Adds 1 or 2 to the cart
Qty 3+: Adds 2 to the cart and pushes the customer to the cart to notify too many added I'd call this better response, by letting me add as many as are in stock rather than 0, but would be supremely happy if they knew the max number they could add before they click add to cart

31 Dec 2015, 21:18
#2382
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Add to this, a concern I have about using session data to move around the cart is that the session data goes away when a logged in customer with items in the cart logs off (or gets logged off) and then sort of back at square one...

Now, I could force the text field to contain a single character if it was pushed as empty, but not exactly sure that's the route I would want to go, might need to look at how it is handled later, like when brought back to the product after clicking on the item in the cart, does it contain the new single character or is it removed?

Personally, I'd put this on a lower tier. If the customer logs off, they walked away from their cart. It would be nice to save the cart for them, but that's us being nicer than we have to be (not a bad thing, but not mandatory either). Thankfully, Zen Cart is stable enough that getting dumped is very rare from what I've seen.

I know it's a bad word thanks to twits misusing them, but cookies were designed specifically for this kind of thing...

31 Dec 2015, 21:53
#2383
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Since we're actively developing a couple of tools, I'm constantly monitoring the logs..
After installing the most recent update:
Invalid argument supplied for foreach() in /includes/classes/pad_base.php on line 445

31 Dec 2015, 23:16
#2384
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

michael_rebreathe:

Since we're actively developing a couple of tools, I'm constantly monitoring the logs..
After installing the most recent update:
Invalid argument supplied for foreach() in /includes/classes/pad_base.php on line 445

That might be because of the use of the sba option for single attributes... (Haven't tested it for such)...

Great testing data, thank you... Will need to do something similar for product with text equivalent boxes..

But, again, when referring to product 2 above, take a look in the attributes controller at what option name is used for that product, then.. in option names (handy button in the top left corner), what is the option name type for that option name? My guess is simply 'dropdown'... Try changing it to 'SBA Select List (Dropdown) Basic' then again, with Dynamic Dropdowns set to only apply to multiple attributes check out that product again... Should act as desired.

31 Dec 2015, 23:35
#2385
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

That might be because of the use of the sba option for single attributes... (Haven't tested it for such)...

Great testing data, thank you... Will need to do something similar for product with text equivalent boxes..

But, again, when referring to product 2 above, take a look in the attributes controller at what option name is used for that product, then.. in option names (handy button in the top left corner), what is the option name type for that option name? My guess is simply 'dropdown'... Try changing it to 'SBA Select List (Dropdown) Basic' then again, with Dynamic Dropdowns set to only apply to multiple attributes check out that product again... Should act as desired.

Doing my happy dance! Aside from the smaller quirks mentioned before, works precisely as we need!

Even with as much simplification as we've tried, we still have a total of 14 options with 3 to 30 values each. Is there a risk to setting all to "SBA Select List (Dropdown) Basic"? Thankfully, all of our attributes are from enumerated lists, so dropdown of some variant.

We have a wide array of pairing Options on products, we have just about every single and double attributes for Size, Color, Gauge, Resistance, Design, Length, Shape, Capacity...

01 Jan 2016, 03:11
#2386
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Fyi, thought I fixed this the last go round, but one of the fixes identified was in includes/functions/extra_functions/products_with_attributes.php

Lines 489-491 change from:

            if ($stockResult->EOF) {
              $notAccounted = true;
            }

To:

            if ($stock_values->EOF) {
              $notAccounted = true;
            }

I had applied it and I believe that would resolve the "bounce" to cart to discover not available issue, but it led me to discover something else that I can't remember at the moment and probably won't get to tonight. :)

As to using the sba dropdown across the board, from what I have seen that the guys did was to take a standard dropdown and add some html capability to it... Guess could add a setup sql to change/allow the change of all of the appropriate option name data types to the sba version... Was just trying not to have/let the software take over "everything". :)

01 Jan 2016, 21:06
#2387
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Oddly, one item in our catalog (which we have found so far) has completely wierded out. I've just started investigating the issue, but this is looking pretty big.

One of our products has two options: color and capacity
COLOR:
Black
Blue
Clear
Orange
Pink
Light Pink

CAPACITY
Small (2.5ml)
Large (5.0ml)

The attributes dropdowns that present on the product page:
Capacity
First Select Color
Black
Blue
Clear
Orange
Pink
Light Pink

COLOR
Next select capacity
(no options)

COLOR (note, smaller text size)
First Select Color
Black
Blue
Clear
Orange
Pink
Light Pink

No matter what order we try selecting the attributes, we never reach the state where we can select color and capacity to add it to the cart.

We just noticed that products_with_attributes_stock.product_attribute_combo is being nulled out in an as-yet-unseen pattern. The mentioned product has only one color/capacity combination with this field still populated. We are updating our inventory for imminent site release. We selected an item with product_attribute_combo populated, and updated it's inventory. This did not null product_attribute_combo...

Apologies for the segmented and incomplete info...I'm hoping this will spark a thought for a quick fix.

01 Jan 2016, 21:57
#2388
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

michael_rebreathe:

Oddly, one item in our catalog (which we have found so far) has completely wierded out. I've just started investigating the issue, but this is looking pretty big.

One of our products has two options: color and capacity
COLOR:
Black
Blue
Clear
Orange
Pink
Light Pink

CAPACITY
Small (2.5ml)
Large (5.0ml)

The attributes dropdowns that present on the product page:
Capacity
First Select Color
Black
Blue
Clear
Orange
Pink
Light Pink

COLOR
Next select capacity
(no options)

COLOR (note, smaller text size)
First Select Color
Black
Blue
Clear
Orange
Pink
Light Pink

No matter what order we try selecting the attributes, we never reach the state where we can select color and capacity to add it to the cart.

We just noticed that products_with_attributes_stock.product_attribute_combo is being nulled out in an as-yet-unseen pattern. The mentioned product has only one color/capacity combination with this field still populated. We are updating our inventory for imminent site release. We selected an item with product_attribute_combo populated, and updated it's inventory. This did not null product_attribute_combo...

Apologies for the segmented and incomplete info...I'm hoping this will spark a thought for a quick fix.

Well there is also something else going on there, which I have seen if the tpl_modules_attributes.php file is not merged/replaced correctly. It looks like color options are being applied/listed against capacity and capacity items against color...

I don't understand the statement that products_with_attributes_stock.product_attribute_combo going to null... Doesn't need to be in depth, but helps to follow. :)

I'm still working on things on my end to ensure all that has been done previously remains functional.

01 Jan 2016, 22:19
#2389
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Well there is also something else going on there, which I have seen if the tpl_modules_attributes.php file is not merged/replaced correctly. It looks like color options are being applied/listed against capacity and capacity items against color...

I'll replace it ASAP. I'm knees-deep in another bit of joy.

mc12345678:

I don't understand the statement that products_with_attributes_stock.product_attribute_combo going to null... Doesn't need to be in depth, but helps to follow. :)

Looking at products_with_attributes_stock.php, the "unique combo" field is blank, and looks random, but I'm sure it's not...For the product I mentioned, the unique combo was only populated for one attribute combo.

If I look at the table itself (products_with_attributes_stock) in the database, this field (product_attribute_combo) is NULL for some products and attributes, properly populated on others.

mc12345678:

I'm still working on things on my end to ensure all that has been done previously remains functional.
YAY!

01 Jan 2016, 22:35
#2390
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

michael_rebreathe:

Oddly, one item in our catalog (which we have found so far) has completely wierded out. I've just started investigating the issue, but this is looking pretty big.

One of our products has two options: color and capacity
COLOR:
Black
Blue
Clear
Orange
Pink
Light Pink

CAPACITY
Small (2.5ml)
Large (5.0ml)

The attributes dropdowns that present on the product page:
Capacity
First Select Color
Black
Blue
Clear
Orange
Pink
Light Pink

COLOR
Next select capacity
(no options)

COLOR (note, smaller text size)
First Select Color
Black
Blue
Clear
Orange
Pink
Light Pink

No matter what order we try selecting the attributes, we never reach the state where we can select color and capacity to add it to the cart.

We just noticed that products_with_attributes_stock.product_attribute_combo is being nulled out in an as-yet-unseen pattern. The mentioned product has only one color/capacity combination with this field still populated. We are updating our inventory for imminent site release. We selected an item with product_attribute_combo populated, and updated it's inventory. This did not null product_attribute_combo...

Apologies for the segmented and incomplete info...I'm hoping this will spark a thought for a quick fix.

mc12345678:

Well there is also something else going on there, which I have seen if the tpl_modules_attributes.php file is not merged/replaced correctly. It looks like color options are being applied/listed against capacity and capacity items against color...

I don't understand the statement that products_with_attributes_stock.product_attribute_combo going to null... Doesn't need to be in depth, but helps to follow. :)

I'm still working on things on my end to ensure all that has been done previously remains functional.

Under Configuration->Dynamic Dropdowns->Use ZC default HTML Attribute Tags

set it to false if it is not... Intent of that option is to eventually present the dynamic dropdown information with the tags that are provided by ZC so that formatting can be consistently applied. At the moment it's a series of generic tags...

01 Jan 2016, 22:39
#2391
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Under Configuration->Dynamic Dropdowns->Use ZC default HTML Attribute Tags

set it to false if it is not... Intent of that option is to eventually present the dynamic dropdown information with the tags that are provided by ZC so that formatting can be consistently applied. At the moment it's a series of generic tags...

Doesn't exist under Dynamic Dropdowns...

01 Jan 2016, 23:04
#2392
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Also found something in the original Dynamic Dropdowns file that may have sorted as was necessary when first developed but has changed since then.

When I was looking two attributes displayed, each had the same sort order, but alphabetically they would/may display in a modified sequence like what you showed above, when using Dynamic Dropdowns I too was seeing that the sequence did not follow the rules set by configuration->product info->Products Info - Products Option Name Sort Order..

I have locally updated the includes/classes/pad_base.php file to be uploaded with some other modifications/simplifications. Trying to clean up code as there are functions/features used in more than one location so would be best to consolidate the code rather than change multiple locations at least until it gets too complicated to keep as a single source.

The change was this for your interest:
includes/classes/pad_base.php
line 315 change from:

      $products_options_name_query = "select distinct  popt.products_options_id, popt.products_options_name,  popt.products_options_track_stock, popt.products_options_images_style,  popt.products_options_type from " . TABLE_PRODUCTS_OPTIONS . " popt, " .  TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id =  :products_id: and popt.products_options_id = patrib.options_id and  popt.language_id = :languages_id: :stocked_where: order by  popt.products_options_sort_order";

to:

  //LPAD - Return the string argument, left-padded with the specified string 
  //example: LPAD(po.products_options_sort_order,11,"0") the field is 11 digits, and is left padded with 0
  if (PRODUCTS_OPTIONS_SORT_ORDER == '0') {
                $options_order_by= ' order by LPAD(popt.products_options_sort_order,11,"0")';
  } else {
                $options_order_by= ' order by popt.products_options_name';
  }
      $products_options_name_query = "select distinct popt.products_options_id, popt.products_options_name, popt.products_options_track_stock, popt.products_options_images_style, popt.products_options_type from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id = :products_id: and popt.products_options_id = patrib.options_id and popt.language_id = :languages_id: :stocked_where:" . $options_order_by;

I do plan on updating the public download version of Dynamic Dropdowns plugin as there are some things about it that are broke or no longer accurate, but obviously still working out some of its operations.

01 Jan 2016, 23:26
#2393
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

And in the same vein, looked at how the option values are/were sorted... Seems a similar "issue" was there...

So, to address that at "old" line 324 add the code that is below. Providing the code above and below the modification to show context:

      $products_options_name_query = $db->bindVars($products_options_name_query, ':products_id:', $this->products_id, 'integer');
      $products_options_name_query = $db->bindVars($products_options_name_query, ':languages_id:', $_SESSION['languages_id'], 'integer');
      $products_options_name_query = $db->bindVars($products_options_name_query, ':stocked_where:', $stocked_where, 'passthru');

      $products_options_name = $db->Execute($products_options_name_query);

      $attributes=array();
        
      while (!$products_options_name->EOF) {
        $products_options_array = array();
        $products_options_query = "select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = :products_id: and pa.options_id = :products_options_id: and pa.options_values_id = pov.products_options_values_id and pov.language_id = :languages_id: order by pa.products_options_sort_order";

        $products_options_query = $db->bindVars($products_options_query, ':products_id:', $this->products_id, 'integer');
        $products_options_query = $db->bindVars($products_options_query, ':languages_id:', $_SESSION['languages_id'], 'integer');
        $products_options_query = $db->bindVars($products_options_query, ':products_options_id:', $products_options_name->fields['products_options_id'], 'integer');

        $products_options = $db->Execute($products_options_query);
      $products_options_name_query = $db->bindVars($products_options_name_query, ':products_id:', $this->products_id, 'integer');
      $products_options_name_query = $db->bindVars($products_options_name_query, ':languages_id:', $_SESSION['languages_id'], 'integer');
      $products_options_name_query = $db->bindVars($products_options_name_query, ':stocked_where:', $stocked_where, 'passthru');

      $products_options_name = $db->Execute($products_options_name_query);

      $attributes=array();
      if (PRODUCTS_OPTIONS_SORT_BY_PRICE == '1') {
        $order_by = ' order by LPAD(pa.products_options_sort_order,11,"0"), pov.products_options_values_name';
      } else {
        $order_by = ' order by LPAD(pa.products_options_sort_order,11,"0"), pa.options_values_price';
      }
        
      while (!$products_options_name->EOF) {
        $products_options_array = array();
        $products_options_query = "select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = :products_id: and pa.options_id = :products_options_id: and pa.options_values_id = pov.products_options_values_id and pov.language_id = :languages_id: :order_by:";

        $products_options_query = $db->bindVars($products_options_query, ':products_id:', $this->products_id, 'integer');
         $products_options_query = $db->bindVars($products_options_query,  ':languages_id:', $_SESSION['languages_id'], 'integer');
         $products_options_query = $db->bindVars($products_options_query,  ':products_options_id:',  $products_options_name->fields['products_options_id'], 'integer');
         $products_options_query = $db->bindVars($products_options_query,  ':order_by:',  $order_by, 'passthru');

        $products_options = $db->Execute($products_options_query);
02 Jan 2016, 00:32
#2394
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

michael_rebreathe:

I'll replace it ASAP. I'm knees-deep in another bit of joy.

Looking at products_with_attributes_stock.php, the "unique combo" field is blank, and looks random, but I'm sure it's not...For the product I mentioned, the unique combo was only populated for one attribute combo.

If I look at the table itself (products_with_attributes_stock) in the database, this field (product_attribute_combo) is NULL for some products and attributes, properly populated on others.

YAY!

Ohh, that.. Umm as far as I've seen that particular "list" doesn't support anything... In otherwords unless you are personally using it for something, I wouldn't worry about what is being populated there, but I have seen some cases when generating a combination that the unique combo field hasn't gotten updated. One case I have seen this in was where old data was imported to the table but that field wasn't populated... Further, all of the information that is "captured" in that field is a combination of other fields that already exist. If the data must be regrouped then can probably provide a sql statement to recreate all of the missing data for that field..

02 Jan 2016, 00:39
#2395
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Under Configuration->Dynamic Dropdowns->Use ZC default HTML Attribute Tags

set it to false if it is not... Intent of that option is to eventually present the dynamic dropdown information with the tags that are provided by ZC so that formatting can be consistently applied. At the moment it's a series of generic tags...

michael_rebreathe:

Doesn't exist under Dynamic Dropdowns...

Under Configuration for SBA, run the rebuild/upgrade to repopulate the menu options with what is provided in the plugin. That is one of the options that was added in the process... The existing SBA stock table should remain untouched, but as with all things, please backup before doing so, just in case. :)

02 Jan 2016, 21:00
#2396
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Ohh, that.. Umm as far as I've seen that particular "list" doesn't support anything... In otherwords unless you are personally using it for something, I wouldn't worry about what is being populated there, but I have seen some cases when generating a combination that the unique combo field hasn't gotten updated. One case I have seen this in was where old data was imported to the table but that field wasn't populated... Further, all of the information that is "captured" in that field is a combination of other fields that already exist. If the data must be regrouped then can probably provide a sql statement to recreate all of the missing data for that field..

Nice to know it isn't a genuine break...I didn't see anything that broke, but there's a lot of functionality I don't play in on a daily basis. Just 'cuz I didn't see something break because of it still left me concerned.

Yeah, it's a tiny SQL statement to rebuild the column, which I did before I posted the "issue," but wanted to send up the flag just in case it was a monkeywrench. update products_with_attributes_stock set product_attribute_combo = CONCAT(products_id, '-', replace(stock_attributes, ',', '-')) ;

02 Jan 2016, 21:16
#2397
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Under Configuration for SBA, run the rebuild/upgrade to repopulate the menu options with what is provided in the plugin. That is one of the options that was added in the process... The existing SBA stock table should remain untouched, but as with all things, please backup before doing so, just in case. :)

Now, I'm getting really worried...I'm not finding rebuild/upgrade anywhere on stock_by_attr_install.php or products_with_attributes_stock.php. The version of both on the site were updated 12/31/2015 when I updated it the last time.

Installation
Full/Upgrade DB Install

Removal
Remove All from DB

Optional SQL Scripts
Default SQL
Add all Product Attributes
Add display-only product attributes
Add product attributes that are NOT display-only
Remove product attributes that are ONLY read-only
Update Unique Combo field Here's a way to repopulate the field I mentioned earlier
Remove ALL entries from the PAS Table

Tests
File Check

Export / Import
Export Table Data
Import Table Data

02 Jan 2016, 21:21
#2398
michael_rebreathe avatar

michael_rebreathe

New Zenner

Join Date:
Jul 2015
Posts:
43
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

mc12345678:

Well there is also something else going on there, which I have seen if the tpl_modules_attributes.php file is not merged/replaced correctly. It looks like color options are being applied/listed against capacity and capacity items against color...

I don't understand the statement that products_with_attributes_stock.product_attribute_combo going to null... Doesn't need to be in depth, but helps to follow. :)

I'm still working on things on my end to ensure all that has been done previously remains functional.

tpl_modules_attributes.php was updated with the last download from GitHub (2015-12-31)

03 Jan 2016, 04:35
#2399
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

michael_rebreathe:

Now, I'm getting really worried...I'm not finding rebuild/upgrade anywhere on stock_by_attr_install.php or products_with_attributes_stock.php. The version of both on the site were updated 12/31/2015 when I updated it the last time.

Installation
Full/Upgrade DB Install

Removal
Remove All from DB

Optional SQL Scripts
Default SQL
Add all Product Attributes
Add display-only product attributes
Add product attributes that are NOT display-only
Remove product attributes that are ONLY read-only
Update Unique Combo field Here's a way to repopulate the field I mentioned earlier
Remove ALL entries from the PAS Table

Tests
File Check

Export / Import
Export Table Data
Import Table Data

Sorry, I know I should have used exact terminology, but I intended:
Installation
Full/Upgrade DB Install

That has/was written to preserve the existing data table, add any fields that were necessary and redo the configuration options back to "default"...

Sorry for the delayed response, I saw the first hooray and didn't follow up to see if there was more. :). Going to be uploading some more changes (though none to the configuration options) very soon. Trying to verify that I have captured in the fileset what worked on the test site.

03 Jan 2016, 17:02
#2400
jnabird333 avatar

jnabird333

New Zenner

Join Date:
Dec 2015
Location:
Ohio
Posts:
16
Plugin Contributions:
0

Re: Stock by Attribute v4.0 addon for v1.3.5-1.3.9

Hello, I am running into a small issue with trying to install this on my 1.5.4 Zen cart...I have already backed up my website and made an exact copy of my existing database. I uploaded the files and chose replace existing. I went to the install.php address and logged in to my Zen cart admin area. I selected check files and verified no errors. I selected the Full/Upgrade option and ran the script. Nothing happened...my screen didn't change in display and it never said the database was successfully changed as the directions state would happen. Please advise as I still don't see the SBA option under Catalodg.

I am new to this and REALLY need this add-on to track my inventory.

Alana

Adding: The screen shows SBA Version 1.5.3 for Zen Cart Version 1.5.1. I chose the most recent download which showed that it works with 1.5.4.