Page 258 of 359 FirstFirst ... 158208248256257258259260268308358 ... LastLast
Results 2,571 to 2,580 of 3589
  1. #2571
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    For whom it may concern (or has interest), there have been a number of improvements made to the SBA code that are currently available on github and if I can get the instructions properly updated will be provided to ZC as an updated plugin.

    The code is written/provided to support ZC 1.5.1, 1.5.3, 1.5.4, and 1.5.5(all "versions) (haven't tried applying it against 1.6.0 yet). Features that are/have been addressed:
    - The potteryhouse/jeking created Simple SBA dropdown option now shows up as an option in the Option Names catalog area. This option supports display of Out-Of-Stock attributes that are the only selectable dropdown and also with populating with the remaining quantity of the particular attribute inside of the dropdown area.
    - If a product has one dropdown and multiple Read-Only attributes, then the Simple SBA dropdown will remain functional a an option.
    - If a product has more than one dropdown then Dynamic Dropdowns will be considered for use unless there are other attribute types like file uploads, text entry boxes, read-only, or check boxes. If any of those are offered as an attribute to the product then Dynamic Dropdowns will be turned off for that product (until further developed to work better with it all).
    - File uploads are now supported, and there is an option in the includes/extra_cart_actions file that will allow creating a duplicate of an uploaded file if/when using other software such as product attribute grid where it may be desired to have the same file upload applied to each "version" of the product when uploaded all at once.
    - When the Simple SBA dropdown option is in use, attribute images now properly swap with the main image. The attribute images can be displayed along with the attributes like the standard design suggests, they can be shown as normally and allowed to switch out with the main image, or they can be set to simply swap with the main image. Image swapping is not yet factored in for product with multiple attributes, but a full scheme is coming soon.
    - Added an observer for the shopping cart to swap the image in the shopping cart display if it meets the criteria for swapping on the product info page.

    - Admin, in the SBA menu, entering a text search provides a response that is now editable. If the text search results in only one item from the dropdown then the dropdown is updated to show the information for the searched item.
    - Modified some of the code to use more of ZC's functions to support future upgrade compatibility.
    - Began combining functions into a class instead of being stand alone functions that may not be related to the rest of ZC.
    - Began working a method of retrieving the customid from hitorical sales records instead of live/current database records.
    - Attributes Controller now has a link on it such that if attributes are applied to a product then clicking on the link will take to the SBA admin screen with the product activated for manipulation.
    - Files requiring some form of modification have reduced significantly with ZC 1.5.5 and continue to search for ways to reduce the code changes needed.

    - Verified that it is possible for Dynamic Price Updater to work with SBA provided a few modifications are made to DPU for it to play nicely with other jQuery/javascript.

    Current installation "path" is to:
    rename YOUR_TEMPLATE folders to match the folder name of your template,
    then install all of the files that are in the includes and the admin folder of the download,
    then to navigate to the folder for your version of ZC
    and upload the files in the includes and admin folders there (rename folders with YOUR_TEMPLATE here as well).
    Then in admin once logged in goto the following file and install/upgrade, existing variants will remain, but your SBA settings will be reset to the default values.

    Thought I would throw that out there in case anyone had interest, was curious etc. Welcome further input now that all of the built in attribute types are supported at least for a basic set of options. Working on version identification as well...

    Software is currently available from github at https://github.com/mc12345678/Stock_...butes_Combined or as a zip file by this link: https://github.com/mc12345678/Stock_...ive/master.zip
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2572
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

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

    Quote Originally Posted by mc12345678 View Post
    Then in admin once logged in goto the following file and install/upgrade, existing variants will remain, but your SBA settings will be reset to the default values.
    I just installed this on a 1.5.5 site and there were no issues (Except the instructions ;-) )

    The file that you should go to to complete the install is www.domain.com/admin/stock_by_attr_install.php. Which btw works flawlessly.

  3. #2573
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Quote Originally Posted by badarac View Post
    I just installed this on a 1.5.5 site and there were no issues (Except the instructions ;-) )

    The file that you should go to to complete the install is www.domain.com/admin/stock_by_attr_install.php. Which btw works flawlessly.
    Thanks badarac, and I also just realized that in the "installation" of files one should always consider merging rather than overwriting as part of the installation.

    I've really been trying to pull the SBA parts out of the files so that there is little to no file modifications, but there are still some files that require a little touching here and there. One of the next items to try to address is to get the customid information pulled out of the files a little more and more centralized in functionality, then to get back to the javascript of multiple attributes. Have some ideas and want to again reduce the file modifications needed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #2574
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Received some feedback on an installation of the plugin on ZC 1.5.4. For those that downloaded the plugin following the above post, there is an issue in the installation script for ZC versions 1.5.4 and below that is now corrected. For those that downloaded, the changes are identified at this commit difference and the file is available from this commit. For those curious, the issue was that the function zen_register_admin_page was considered/incorporated into the code, but in looking at the ZC 1.5.5 version, the sort order (relates to where in the menu list the option is supposed to appear) is "auto-determined" if not provided. Prior to this (yes a simple comparison/review) as in ZC 1.5.1 - 1.5.4 (versions considered applicable for this plugin), the sort order had to be provided when using the function. The sort_order calculation already existed without using this ZC function, but when zen_register_admin_page was incorporated the code was not rearranged to support backwards compatibility. That has been resolved as of a few minutes ago. A few further code improvements were incorporated into the associated function as well. While I was there, figured I should address them.

    For those that like to just "see" the code changes, they are from:
    Code:
    	if (function_exists('zen_register_admin_page')) { 
    	  zen_register_admin_page('productsWithAttributesStockSetup', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', '', 'configuration', 'Y'); 
    	  zen_register_admin_page('productsWithAttributesStockAjax', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', '', 'catalog', 'N'); 
    	} else { 
    	  //get current max sort number used, then add 1 to it. 
    	  //this will place the new entry 'productsWithAttributesStock' at the bottom of the list 
    	  $sql = "SELECT ap.sort_order 
    		  	FROM ".TABLE_ADMIN_PAGES." ap 
    			  WHERE ap.menu_key = 'configuration' 
    			  order by ap.sort_order desc limit 1"; 
    	  $result = $db->Execute($sql); 
    	  $result = $result->fields['sort_order'] + 1; 
    	 
    	  $sql = "INSERT INTO `".TABLE_ADMIN_PAGES."` (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order)  
    			    VALUES  
    			    ('productsWithAttributesStockSetup', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', '', 'configuration', 'Y', ".$result.")"; 
    	  $db->Execute($sql); 
    	  $sql = "INSERT INTO `".TABLE_ADMIN_PAGES."` (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order)  
    			    VALUES  
    			    ('productsWithAttributesStockAjax', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', '', 'catalog', 'N', ".$result.")"; 
    	  $db->Execute($sql); 
    	}
    To:
    Code:
    	// get current max sort number used, then add 1 to it. 
    	// this will place the new entry 'productsWithAttributesStock' at the bottom of the list 
    	$sql = "SELECT MAX(ap.sort_order) as sort_order_max 
    	     FROM " . TABLE_ADMIN_PAGES . " ap 
    	     WHERE ap.menu_key = 'configuration'"; 
    	$result = $db->Execute($sql); 
    	$result = $result->fields['sort_order_max'] + 1; 
    	 
    	if (function_exists('zen_register_admin_page')) { 
    	  zen_register_admin_page('productsWithAttributesStockSetup', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', '', 'configuration', 'Y', $result); 
    	  $result = $result + 1; // provide an increased sort order for the next non-displayed menu. 
    	  zen_register_admin_page('productsWithAttributesStockAjax', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', '', 'catalog', 'N', $result); 
    	} else { 
    	  $sql = "INSERT INTO `".TABLE_ADMIN_PAGES."` (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order)  
    			    VALUES  
    			    ('productsWithAttributesStockSetup', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_SETUP', '', 'configuration', 'Y', :sort_order:)"; 
    		$sql = $db->bindVars($sql, ':sort_order:', $result, 'integer'); 
    	  $db->Execute($sql); 
    	  $result = $result + 1; // provide an increased sort order for the next non-displayed menu. 
    	  $sql = "INSERT INTO `".TABLE_ADMIN_PAGES."` (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order)  
    			    VALUES  
    			    ('productsWithAttributesStockAjax', 'BOX_CONFIGURATION_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', 'FILENAME_PRODUCTS_WITH_ATTRIBUTES_STOCK_AJAX', '', 'catalog', 'N', :sort_order:)"; 
    		$sql = $db->bindVars($sql, ':sort_order:', $result, 'integer'); 
    	  $db->Execute($sql); 
    	}
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #2575
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

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

    MC,
    I'll ask here in case you've run into this before. The mod is installed on a 1.5.5 site using the responsive_classic template. No other mods are installed. When the attribute is ordered the main product stock level is decremented but the attribute stock level is not. The attribute combinations are a drop down attribute (days) and a text attribute (participant info). There are three combinations defined for each product:

    day1 - text
    day2 - text
    day1 & 2 - text

    Each combination has a stock level set to 2000 and the main product has been synced with a quantity of 6000. The 6000 has been decremented but the attribute levels are still 2000.

    Any thoughts?

  6. #2576
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Quote Originally Posted by badarac View Post
    MC,
    I'll ask here in case you've run into this before. The mod is installed on a 1.5.5 site using the responsive_classic template. No other mods are installed. When the attribute is ordered the main product stock level is decremented but the attribute stock level is not. The attribute combinations are a drop down attribute (days) and a text attribute (participant info). There are three combinations defined for each product:

    day1 - text
    day2 - text
    day1 & 2 - text

    Each combination has a stock level set to 2000 and the main product has been synced with a quantity of 6000. The 6000 has been decremented but the attribute levels are still 2000.

    Any thoughts?
    Had run across that issue yet as it worked in previous versions, and the application against ZC 1.5.5 was not significantly modified nor seen as needing to be modified... Running some tests now and will get back. Kind of defeats the purpose of it if the quantities are not reduced all around.

    Wondering if there might be a need for a select sql statement to "refresh" the query and that the report is possibly not exactly correct.

    I see though that the product attributes in question are text entered? is that correct? Not a selectable attribute, but requires manual entry by the customer? If that's the case, will have to investigate that specifically...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #2577
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Just tried with a product that has a single attribute, using the SBA select dropdown option (shouldn't matter which method of presentation to the customer provided the appropriate information is passed to the cart) after purchase, admin shows a decrease in the quantity available. When revisiting the page the quantity of stock presented decreased by the expected 1 unit purchased. So check on single attribute product.

    Going to try to setup an SBA tracked product with a selection and single text field. I totally misread the information that you amply provided... Sheesh..
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #2578
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

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

    Quote Originally Posted by mc12345678 View Post
    Wondering if there might be a need for a select sql statement to "refresh" the query and that the report is possibly not exactly correct.
    Looking at the quantities in the products_with_attributes_stock table I can see that they have not been changed. The quantities being shown are correct.
    Quote Originally Posted by mc12345678 View Post
    I see though that the product attributes in question are text entered? is that correct? Not a selectable attribute, but requires manual entry by the customer? If that's the case, will have to investigate that specifically...
    The variants are a combination of a selectable attribute and a text attribute.

    Name:  Capture.jpg
Views: 166
Size:  36.9 KB

  9. #2579
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Confirmed, that variant with text and dropdown together does not decrement attribute stock... Need to identify why.

    Oddly, now it seems that even with a combination of dropdown product that the quantity is not reduced when processed through 1.5.5... There was a change to the includes/classes/orders.php file that may have affected this, or perhaps an observer is not properly coded? Bummer... Was looking forwards to not having to go back to troubleshoot a "simple" thing like this. Grrr...

    Tried three different style of variants:
    1. two dropdowns (one with 3 items, one with 1 item each combined for a total of three variants). (no change in attribute stock)
    2. one dropdown and one text field (combined attributes such that three variants). (no change in attribute stock)
    3. one dropdown and one text field (individual attributes such that four variants). (only the text field stock was reduced)

    In all cases, the shopping cart looked correct, so it is/was in the follow-on processing of the order being submitted that there is an issue that is not reducing the variant stock (consistently).

    Here is a presentation of the individual variants:
    selection 1 (qty)
    selection 2 (qty)
    selection 3 (qty)
    text (3*qty)

    After purchase, only text was reduced in quantity not the individual selection as well.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #2580
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

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

    Issue appears to be in how the variants are looked up in the function updateNotifyOrderProcessingStockDecrementBegin found in the observer class that references/uses some other functions to go out and identify which SBA variant to update. Need to look into the referenced function and how the update query is put together.

    The goal of that particular function is if the product is tracked by SBA, identify the variant(s) that are assigned for that combination of attributes, obtain the current quantity, subtract the ordered quantity and then update the variant(s) to reflect the new quantity.

    I can visualize where some logic is incomplete depending on how the store is setup to handle variants (combined or individual) but also need to address that it should reference the correct SBA entry in a multi-attribute situation. Haven't looked quite yet at the internally referenced function, but it should self-manage sorting the attributes by product_attributes_id such that the result is properly sorted to find the SBA variant. Otherwise no variant gets updated in the update sql, or as I found, likely only one variant gets updated...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Problems with addon: Dynamic Drop Downs for Stock By Attribute
    By Dunk in forum All Other Contributions/Addons
    Replies: 56
    Last Post: 30 Apr 2014, 07:55 PM
  2. MySQL Problem with Product with Attribute Stock addon
    By rtwingfield in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Sep 2011, 03:35 PM
  3. Hide Zero Quantity Attributes with attribute-stock addon
    By leevil123 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Feb 2010, 05:06 PM
  4. Replies: 4
    Last Post: 22 Jan 2010, 10:43 PM
  5. Price Products in the grid by 'Stock by Attribute' addon?
    By Salixia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 27 Oct 2009, 06:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR