Page 209 of 356 FirstFirst ... 109159199207208209210211219259309 ... LastLast
Results 2,081 to 2,090 of 3558
  1. #2081
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by Kevin205 View Post
    In my version of SBA; deleting a product from catalogue does NOT delete the records belonging to that product in the SBA table. Is there a preferred method of cleaning up / deleting product attribute from SBA table?

    That functionality has not yet been ported into the version of SBA for Zc 1.5.1. Which is the version of ZC identified in your signature as your current version. The functionality however is in the version applicable to ZC 1.5.3 and 1.5.4 available at: https://github.com/potteryhouse/stoc...12345678_ZC154

    Remember this is still beta software. The admin/includes/classes/observers/class.products_with_attributes_stock.php file found in that folder contains the actions necessary to accomplish what you are describing (as well as other functions that would require code changes elsewhere in your system or they could be commented out so as not to throw errors.) To use this file the applicable auto_loaders file would also be necessary to kick ZC off to use the above admin class file.

    Otherwise, the method I would suggest to remove all attributes applicable to a given product would be to delete all sba table entries for that product using a sql query after backing up the database... Yes, backup the database before deleting...

    The expected sql would be:
    Code:
    delete from products_with_attributes_stock where products_id = '20'
    Where 20 would be the product number for the product being deleted... Remember BACKUP before executing.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2082
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    That functionality has not yet been ported into the version of SBA for Zc 1.5.1. Which is the version of ZC identified in your signature as your current version. The functionality however is in the version applicable to ZC 1.5.3 and 1.5.4 available at: https://github.com/potteryhouse/stoc...12345678_ZC154

    Remember this is still beta software. The admin/includes/classes/observers/class.products_with_attributes_stock.php file found in that folder contains the actions necessary to accomplish what you are describing (as well as other functions that would require code changes elsewhere in your system or they could be commented out so as not to throw errors.) To use this file the applicable auto_loaders file would also be necessary to kick ZC off to use the above admin class file.

    Otherwise, the method I would suggest to remove all attributes applicable to a given product would be to delete all sba table entries for that product using a sql query after backing up the database... Yes, backup the database before deleting...

    The expected sql would be:
    Code:
    delete from products_with_attributes_stock where products_id = '20'
    Where 20 would be the product number for the product being deleted... Remember BACKUP before executing.
    Got it and thank you mc12345678.
    Using Zen Cart 1.5.1

  3. #2083
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Is it possible to write a query to display the following in one pass?

    products_id
    products_model
    customid
    products_attributes_id
    options_id
    options_values_id
    products_options_values_name

    I have been trying to get a query to work, but have not been successful.
    Using Zen Cart 1.5.1

  4. #2084
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    I got kicked out while typing!

    I have this query working, but only for one product id (52). I need to retrieve all data.

    PHP Code:
    select 
        p
    .products_id,
        
    p.products_model,
        
    pa.products_attributes_id,
        
    pa.options_values_id,
        
    pov.products_options_values_name,
        
    sba.customid,
        
    sba.quantity
    from
        zen_products 
    as p
            left join
        zen_products_attributes 
    as pa ON p.products_id pa.products_id
            left join
        zen_products_with_attributes_stock 
    as sba ON pa.products_attributes_id sba.stock_attributes
            left join
        zen_products_options_values 
    as pov ON pa.options_values_id pov.products_options_values_id
    where
        p
    .products_id 52
    This question might not belong here; but since it performs a query on the SBA table, I thought it could be OK?
    Using Zen Cart 1.5.1

  5. #2085
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Assuming that you use only single option names with each productit seems that if you removed the where clause, that the results for all products would be returned with null I thought in the fields where a product was not tracked by SBA, if wanted to return only sBA tracked product information, then would change from p.products_id to sba.products_id so that results only included sba tracked product.

    If however product includes multiple option names (multiple attributes) then unfortunately, the query becomes a bit more complex if even possible with the current data structure of SBA. (Stock_attributes contains combinations of attribute information separated by commas instead of an additional table from which to pull the attributes... This has been one of the issues of SBA in times past and why it has been so difficult to overcome some aspects of SBA.

    Ideally though that aspect will be resolved as well as additional capability is added... That said, it also can be worked around in it's current state but requires on occasion additional queries based on the product information.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #2086
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    That did it

    Code:
    replaced
    p.products_id = 52
    
    with
    p.products_id = sba.products_id
    It accomplished what I needed. It now display all SBA related data, Thank you mc12345678
    Using Zen Cart 1.5.1

  7. #2087
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by Kevin205 View Post
    That did it

    Code:
    replaced
    p.products_id = 52
    
    with
    p.products_id = sba.products_id
    It accomplished what I needed. It now display all SBA related data, Thank you mc12345678
    Welcome, still could be made easier (assuming no loss of index power) by swapping the first returned value of p.products_id with sba.products_id and omitting the where statement, but it works.

    If I may ask, what's the usage of this query? Also as stated, not all data will be provided by that one query if the store has multiple attributes for a product.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #2088
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by mc12345678 View Post
    Welcome, still could be made easier (assuming no loss of index power) by swapping the first returned value of p.products_id with sba.products_id and omitting the where statement, but it works.

    If I may ask, what's the usage of this query? Also as stated, not all data will be provided by that one query if the store has multiple attributes for a product.
    Sorry for the late reply.

    While trying to eliminate the discontinued items from the SBA table, I could not find a comprehensive report with all of SBA data needed in one report. That is why I tried to generate the report via SQL.
    Using Zen Cart 1.5.1

  9. #2089
    Join Date
    Dec 2012
    Posts
    607
    Plugin Contributions
    0

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Can customid data be place in e-mails to clients?
    Using Zen Cart 1.5.1

  10. #2090
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Stock by Attribute v4.0 for Zen Cart 1.3.5

    Quote Originally Posted by Kevin205 View Post
    Can customid data be place in e-mails to clients?
    Unfortunately the same answer as before basically applies. Currently supported in the version available from the link above, but not yet ported to version 1.5.3 in support of ZC 1.5.1.
    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