Page 310 of 310 FirstFirst ... 210260300308309310
Results 3,091 to 3,096 of 3096
  1. #3091
    Join Date
    Jul 2012
    Posts
    13,752
    Plugin Contributions
    16

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

    And each of those product's with attributes have variants that are combined so that a pair or combination of 3 attributes has one customid?

    If so, the source of that issue starts in the method zen_get_customid in includes/classes/class.products_with_attributes_class_stock.php

    I think I found the issue in line 284, still need to test the other methods of working with product, but when I changed the line from:
    Code:
    if ($customid->RecordCount() > 0) {
    To:
    Code:
    if ($customid->RecordCount() > 1) {
    Then only one appropriate customid was displayed on the shopping cart page...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  2. #3092
    Join Date
    Jul 2012
    Posts
    13,752
    Plugin Contributions
    16

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

    Quote Originally Posted by mc12345678 View Post
    And each of those product's with attributes have variants that are combined so that a pair or combination of 3 attributes has one customid?

    If so, the source of that issue starts in the method zen_get_customid in includes/classes/class.products_with_attributes_class_stock.php

    I think I found the issue in line 284, still need to test the other methods of working with product, but when I changed the line from:
    Code:
    if ($customid->RecordCount() > 0) {
    To:
    Code:
    if ($customid->RecordCount() > 1) {

    Then only one appropriate customid was displayed on the shopping cart page...
    Although, the customid didn't replace the model number when that was set that way. Instead should be == 0 instead of > 1.

    Yes, the result puts the customid in two places on the catalog side then, but that still is customizable on the template and perhaps more so in the software with further input. Trying not to make a mess of settings though.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #3093
    Join Date
    Jun 2012
    Posts
    171
    Plugin Contributions
    0

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

    Yes, each variant consists of two attributes with a single customid. Option 1 (Scale) has three possible values; option 2 has two possible values. That's a total of six possible variants and each variant has a customid. What is perplexing to me is the different number of customid's displayed. That is, I ordered three of the six possible variants. One had the correct customid, another had two customids displayed, and another had four ids displayed.

    I'll try your fix next.

  4. #3094
    Join Date
    Jun 2012
    Posts
    171
    Plugin Contributions
    0

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

    With your two changes described in posts 3089 and 3091 incorporated in the code, the correct customid is displayed on the catalog side on the shopping cart page, checkout confirmation page and orders history page. But the correct customid is displayed twice on the orders history page.

    The correct customid is displayed in the admin on the orders page (edit or details) and on the packing slip. No repeats like on the catalog side/orders history page.

    I tried it for each of the six variants of the product with two options, and on products with single options.

  5. #3095
    Join Date
    Jul 2012
    Posts
    13,752
    Plugin Contributions
    16

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

    Quote Originally Posted by Dave224 View Post
    With your two changes described in posts 3089 and 3091 incorporated in the code, the correct customid is displayed on the catalog side on the shopping cart page, checkout confirmation page and orders history page. But the correct customid is displayed twice on the orders history page.

    The correct customid is displayed in the admin on the orders page (edit or details) and on the packing slip. No repeats like on the catalog side/orders history page.

    I tried it for each of the six variants of the product with two options, and on products with single options.
    On the orders history page, with the doubling of the customid. Am I correct that in the stock configuration settings that customid is set to replace the model number?

    One thing I hadn't yet worked on was a consistent way of presenting the customid. In some cases it is shown separate from the attribute's, some places along with, etc... in the account history it is both the customid and the products model which when replaced means that it shows twice... I can't use the current settings to identify whether both should be shown or not because that could change, I'm a smidge reluctant to add a field in the database to capture the condition at the time of recording, but guess that may need to be the way to go for appropriate handling. Alternatively could check to see if the two are the same and if so, only present one, but perhaps someone has a reason for both customid and model number to be the same and want both to be displayed/available...

    Or perhaps modify how the products_model is "replaced" by the customid...

    Regardless, thank you for the feedback and identification that when I changed the method verification of a variable's state in this area that I made a mistake.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  6. #3096
    Join Date
    Jun 2012
    Posts
    171
    Plugin Contributions
    0

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

    Quote Originally Posted by mc12345678 View Post
    On the orders history page, with the doubling of the customid. Am I correct that in the stock configuration settings that customid is set to replace the model number?
    Yes, I had that setting set to "1". Both customids were the correct SBA ids. Rerunning with the setting set to "false", I still got a double customid, one is the correct SBA customid. The other is the model.

    BTW, I think you need to check the value of STOCK_SBA_DISPLAY_CUSTOM_ID in tpl_account_history_info_default.php. I changed line 44 to:
    Code:
            <td class="accountProductDisplay"><?php echo  $order->products[$i]['name'] . ' ' . ((STOCK_SBA_DISPLAY_CUSTOMID == 'true') ? $customid[$i] : ''); // MOD for "Stock by Attributes" 1 of 1
    As I mentioned in an earlier post, I normally run with customid turned off. My intention is not display custom id on the catalog side or in the admin with the attributes, but use the replace model with customid feature for admin orders-edit, invoice and packing slip pages to assist the packer. Also, I don't display model anywhere on the catalog side.
    Last edited by Dave224; 30 Mar 2019 at 08:21 PM.

 

 

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