Page 188 of 358 FirstFirst ... 88138178186187188189190198238288 ... LastLast
Results 1,871 to 1,880 of 3575
  1. #1871
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

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

    Quote Originally Posted by Tony Kast View Post
    Hi Can anyone help, when i first installed SBA i had a minimum delivery section which i deleted, now my site keeps going wrong, when i add a attribute i get a error message on checkout and shipping estimate, if i dont add one it works fine does anyone know of an easy fix ive tried updating the database and trying again but it does the same everytime i reinstall it and now im not getting the delivery option
    Need more information before being able to venture a guess.
    What version of SBA did you install? As there are several versions of this branch of the mod and there are also other branches that are supported in other threads.

    In what file (and what line number) did you delete the "minimum delivery section"?
    Also need to know which version of Zen Cart you store is using?
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  2. #1872
    Join Date
    Oct 2013
    Location
    Chatham, Medway, United Kingdom
    Posts
    2
    Plugin Contributions
    0

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

    Hi Thanks for your reply, i unistalled the module and reinstalled it a few times and i managed to get the minimum delivery option back, im now having another problem though all of my items are showing out of stock, regardless of how many i have they all say the same amount and then out of stock when i test a check out, im using Stock By Attribute (SBA) installation script SBA Version 1.5.3 for Zen Cart Version 1.5.1 By POTTERY HOUSE my shop is at sharerescue.co.uk/shop

    thanks for any help you can offer

  3. #1873
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

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

    Quote Originally Posted by Tony Kast View Post
    Hi Thanks for your reply, i unistalled the module and reinstalled it a few times and i managed to get the minimum delivery option back, im now having another problem though all of my items are showing out of stock, regardless of how many i have they all say the same amount and then out of stock when i test a check out, im using Stock By Attribute (SBA) installation script SBA Version 1.5.3 for Zen Cart Version 1.5.1 By POTTERY HOUSE my shop is at sharerescue.co.uk/shop

    thanks for any help you can offer
    The issue looks like a simple configuration problem.
    The instructions included with the mod should help you, if you have suggestions to make the instructions clearer or otherwise improved please send to me as I am currently working on a new version that improves the selection list and rotates the image on selection change.

    Basically, you should do the following.
    1. in admin, goto 'configuration -> stock' and make changes as you need to make you page look as you want.
    2. in admin, goto 'catalog -> Product with Attribute stock (aka SBA)' and add stock and combinations that you need for each product.

    The instruction with the mod should help with understanding what each option does.
    Note that each time you run the SBA installation script it resets all options to a default state, thus if you previously made these changes but than ran the installation script again, everything is reset.
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  4. #1874
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

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

    Zen Cart v1.5.1, SBA 1.5.3. Clean install with only the SBA files in a new template.

    I have "SBA Display Custom ID" = true.

    I created an product with 2 attributes, size XL and XXL, and gave them each a custom ID (11111111111111 and 22222222222222).
    When I add both XL and XXL to the shopping cart, it looks like this:
    Code:
    test
    item # 11111111111111
    Size - XL
    test
    item # 22222222222222
    Size - XXL
    However, once I get to checkout_comfirmation, it now looks like this: (testtest123 is the product model)
    Code:
    test
    item # 11111111111111
    Size - XL
    test
    item # testtest123
    Size - XXL
    And so it stays once I completed the order. In Customers/orders, and everywhere else (invoice, etc).
    It seems that the custom ID is replaced by the product model for all but the first attribute.

    What could be causing this? How can I fix it?

  5. #1875
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

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

    It seems the error is introduced in this section: (/includes/functions/extra_functions/products_with_attributes.php line 98)
    PHP Code:
                      if(sizeof($attributes) > 1){
                          
    $first_search 'where options_values_id in ("'.implode('","',$attributes).'")';
                      } else {
                          
    //even though there is only one attribute, it is still in an array and must be retrieved
                          
    foreach($attributes as $attribute){
                              
    $first_search ' where options_values_id="'.$attribute.' "';
                          }
                      } 
    Removing the if/else and leaving only the second option solves the custom ID issue.
    Obviously you could also raise the number in the if statement so that it is never triggered.
    This however seems like a flimsy solution at best.

    The issue remains on the other pages though. (orders, invoice etc)
    Last edited by SHK; 19 May 2014 at 06:35 PM.

  6. #1876
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

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

    Altering this in the same way solves the customer ID issue on the other pages.. (/admin/includes/classes/products_with_attributes_stock.php line 513)
    PHP Code:
                      if(sizeof($attributes) > 1){
                          
    $first_search 'where options_values_id in ("'.implode('","',$attributes).'")';
                      } else {
                          
    //even though there is only one attribute, it is still in an array and must be retrieved
                          
    foreach($attributes as $attribute){
                              
    $first_search ' where options_values_id="'.$attribute.' "';
                          }
                      } 
    Im not sure I would risk using this on my live site, but it seems to work alright on my test sites.

  7. #1877
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

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

    For non SBA-products, the product model replaces the custom ID. This works fine in the cart, but yet again, not in the checkout nor order/invoice/etc.
    Reading the code, it seems like this was supposed to work. (/includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php line 165)
    PHP Code:
    <?php
        
    // START "Stock by Attributes"
        
    $customid null;
        
    $tmpCheck null;
        if( 
    STOCK_SBA_DISPLAY_CUSTOMID == 'true'){
            if ( (isset(
    $order->products[$i]['attributes'])) &&  (sizeof($order->products[$i]['attributes']) > 0) ) {
                
    //create array for use in zen_get_customid
                
    for ($j 0$n2 sizeof($order->products[$i]['attributes']); $j $n2$j++) {
                    
    $attributes[] = $order->products[$i]['attributes'][$j]['value_id'];//value_id option_id
                
    }
                
    $customid '(';
                
    //get custom ID
                
    for ($j 0$n2 sizeof($order->products[$i]['attributes']); $j $n2$j++) {
                    if( 
    $tmpCheck != zen_get_customid($order->products[$i]['id'],$attributes) ){
                        
    $tmpCheck zen_get_customid($order->products[$i]['id'],$attributes);
                        
    $customid .= ' ' zen_get_customid($order->products[$i]['id'],$attributes) . ' ';
                    }
                }
                
    $customid .= ')';
            }
            elseif(isset(
    $order->products[$i]['products_model'])){
                
    $customid '(' $order->products[$i]['products_model'] . ')';
            }
        }
        echo 
    $customid;
          
    // END "Stock by Attributes"
    ?>
    That elseif is suposed to grab the products_model and use it in place of the custom ID, but it does not work.
    At line 158, several calls in the non-SBA code omits the products_ prefix, so I did the same. And that worked.
    PHP Code:
    <?php // now loop thru all products to display quantity and price ?>
    <?php 
    for ($i=0$n=sizeof($order->products); $i<$n$i++) { ?>
            <tr class="<?php echo $order->products[$i]['rowClass']; ?>">
              <td  class="cartQuantity"><?php echo $order->products[$i]['qty']; ?>&nbsp;x</td>
              <td class="cartProductDisplay"><?php echo $order->products[$i]['name']; ?>
              <?php  echo $stock_check[$i]; ?>
    Now, if I alter /admin/orders.php to display custom ID instead of product model, there will be a consistent display throughout the catalog and admin.
    At every step, each product or product attribute, representing actual products in my store, are listed with their unique EAN.
    This may not be how everyone uses SBA, but it certainly is how I want it to work.

    At any rate.. are these alterations I've made fixes to flaws in the code, or should I look elsewhere for the actual cause of my problem?

    Thanks for any help!

  8. #1878
    Join Date
    Jun 2012
    Location
    Florida
    Posts
    123
    Plugin Contributions
    5

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

    Quote Originally Posted by SHK View Post
    For non SBA-products, the product model replaces the custom ID. This works fine in the cart, but yet again, not in the checkout nor order/invoice/etc.
    Reading the code, it seems like this was supposed to work. (/includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php line 165)
    PHP Code:
    <?php
        
    // START "Stock by Attributes"
        
    $customid null;
        
    $tmpCheck null;
        if( 
    STOCK_SBA_DISPLAY_CUSTOMID == 'true'){
            if ( (isset(
    $order->products[$i]['attributes'])) &&  (sizeof($order->products[$i]['attributes']) > 0) ) {
                
    //create array for use in zen_get_customid
                
    for ($j 0$n2 sizeof($order->products[$i]['attributes']); $j $n2$j++) {
                    
    $attributes[] = $order->products[$i]['attributes'][$j]['value_id'];//value_id option_id
                
    }
                
    $customid '(';
                
    //get custom ID
                
    for ($j 0$n2 sizeof($order->products[$i]['attributes']); $j $n2$j++) {
                    if( 
    $tmpCheck != zen_get_customid($order->products[$i]['id'],$attributes) ){
                        
    $tmpCheck zen_get_customid($order->products[$i]['id'],$attributes);
                        
    $customid .= ' ' zen_get_customid($order->products[$i]['id'],$attributes) . ' ';
                    }
                }
                
    $customid .= ')';
            }
            elseif(isset(
    $order->products[$i]['products_model'])){
                
    $customid '(' $order->products[$i]['products_model'] . ')';
            }
        }
        echo 
    $customid;
          
    // END "Stock by Attributes"
    ?>
    That elseif is suposed to grab the products_model and use it in place of the custom ID, but it does not work.
    At line 158, several calls in the non-SBA code omits the products_ prefix, so I did the same. And that worked.
    PHP Code:
    <?php // now loop thru all products to display quantity and price ?>
    <?php 
    for ($i=0$n=sizeof($order->products); $i<$n$i++) { ?>
            <tr class="<?php echo $order->products[$i]['rowClass']; ?>">
              <td  class="cartQuantity"><?php echo $order->products[$i]['qty']; ?>&nbsp;x</td>
              <td class="cartProductDisplay"><?php echo $order->products[$i]['name']; ?>
              <?php  echo $stock_check[$i]; ?>
    Now, if I alter /admin/orders.php to display custom ID instead of product model, there will be a consistent display throughout the catalog and admin.
    At every step, each product or product attribute, representing actual products in my store, are listed with their unique EAN.
    This may not be how everyone uses SBA, but it certainly is how I want it to work.

    At any rate.. are these alterations I've made fixes to flaws in the code, or should I look elsewhere for the actual cause of my problem?

    Thanks for any help!
    I plan to look at this soon (within a week I hope), to verify your findings, and provide an update. Thank you for the information (and code samples), there are always scenarios we overlook or do not see when working and testing code updates, this testing and feedback you and others provide is very important. I will post what I find, and a package for others to test prior to adding to plugins.

    Brent
    Backup Files and Databases First. GitHub
    Suggestions, Plugins, etc. used at your own risk.

  9. #1879
    Join Date
    May 2014
    Location
    Suomi
    Posts
    1
    Plugin Contributions
    0

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

    Hi!
    I have problems with Custom ID too
    a made fresh install on test server. zencart 1.5.1 and last stock by attributes, nothing else

    1. I have only one product with 3 colors and 3 sizes, and Custom IDs
    Click image for larger version. 

Name:	1.png 
Views:	100 
Size:	27.4 KB 
ID:	14091

    2. Lets add them to the cart, we see that custom id is showing correctly
    Click image for larger version. 

Name:	2.png 
Views:	100 
Size:	25.6 KB 
ID:	14092

    3. Let's go to checkout page - Only One custom ID is showing, others are blank ( )
    Click image for larger version. 

Name:	3.png 
Views:	80 
Size:	13.0 KB 
ID:	14093

    4. And now we confirm order and let's go to admin panel to watch new order
    Click image for larger version. 

Name:	4.png 
Views:	78 
Size:	12.1 KB 
ID:	14094

    Only one Custom ID is showing, second custom id is wrong :-// other are blank

    I need a solution for this. Thank you

  10. #1880
    Join Date
    Feb 2012
    Posts
    7
    Plugin Contributions
    0

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

    I installed this and everything seems to be working fine but am getting a blank page when I checkout - the file link on URL is -

    http://importedhai.com/index.php?mai...ckout_shipping

    Can you please help what file am I missing out - Thanks

 

 

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