Page 56 of 113 FirstFirst ... 646545556575866106 ... LastLast
Results 551 to 560 of 1125
  1. #551
    Join Date
    Oct 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    i accidentally uploaded the files for the stock attributes, before i installed the sql patch. Now it doesn't work when i try and install the sql.

    here is the error message

    1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
    in:
    [INSERT INTO zen_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show available stock level in cart when less than order', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '6', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false')," );]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

    I have tryed many things but am stuck. if you could help me that would be great!!!!

    Thanks!!

  2. #552
    Join Date
    Oct 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    nvermind i fixed it

  3. #553
    Join Date
    Nov 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    [FONT=Arial]Hi all,

    [/FONT] [FONT=Arial]I have installed the products with attributes stock mod on my fresh ZenCart install. When i try to select it form the Catalog Menu i get the follwing errors...[/FONT]
    [FONT=Arial][/FONT]
    [FONT=Arial][/FONT]
    [FONT=Arial]*Warning*: main(includes/classes/products_with_attributes_stock.php) [function.main (http://nutmegsjewellery.co.uk/newsto.../function.main)]: failed to open stream: No such file or directory in */home/sites/nutmegsjewellery.co.uk/public_html/newstore/admin/products_with_attributes_stock.php* on line *12*[/FONT]
    [FONT=Arial][/FONT]
    [FONT=Arial]*Warning*: main(includes/classes/products_with_attributes_stock.php) [function.main (http://nutmegsjewellery.co.uk/newsto.../function.main)]: failed to open stream: No such file or directory in */home/sites/nutmegsjewellery.co.uk/public_html/newstore/admin/products_with_attributes_stock.php* on line *12*[/FONT]
    [FONT=Arial][/FONT]
    [FONT=Arial]*Warning*: main(includes/classes/products_with_attributes_stock.php) [function.main (http://nutmegsjewellery.co.uk/newsto.../function.main)]: failed to open stream: No such file or directory in */home/sites/nutmegsjewellery.co.uk/public_html/newstore/admin/products_with_attributes_stock.php* on line *12*[/FONT]
    [FONT=Arial][/FONT]
    [FONT=Arial]*Fatal error*: main() [function.require (http://nutmegsjewellery.co.uk/newsto...nction.require)]: Failed opening required 'includes/classes/products_with_attributes_stock.php' (include_path='.:/usr/share/pear') in */home/sites/nutmegsjewellery.co.uk/public_html/newstore/admin/products_with_attributes_stock.php* on line *12[/FONT]
    [FONT=Arial]*[/FONT]
    [FONT=Arial]I followed the instructions ot the letter and I am using the latest release of the mod and a fresh install of the latest version of Zen Cart
    [/FONT]

  4. #554
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Stocks by attributes

    It could be that the user account used to deliver web pages to users on your server (typically IUSR_xxxxx on Windows) does not have read permissions to the folder/file

    public_html/newstore/admin/products_with_attributes_stock.php

    Login in to your server/control panel and check the permissions on this file/folder.

    Kev

  5. #555
    Join Date
    Nov 2006
    Posts
    39
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    hanks Kev, It was previously set to 644. I have tried it on 666 but now get the follwing error...

    A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.Bit baffled by this, thought it would be strightforward install :s

  6. #556
    Join Date
    Feb 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    is it possible to set the quantity for all variants on every product id in one go, to say 100?

    I have over 3000 products, and it seems a bit long winded to click Add Quantity For Product Variant and select all for the options and 100 for quanity!

    hope that makes sense

  7. #557
    Join Date
    Dec 2008
    Posts
    79
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    I've looked through the code for the stock_by_attribute add-on and it looks like the verification is done at checkout. Is there any modifications that would prevent an attribute from showing in the product listing. For example if I want to allow time slots for an event but only allow qty 1 for each time slot. I don't want the customer to have to go through checkout multiple times trying to find an open time slot. I want them to be able to only see available time slots unless someone has purchased that time slot in the time it took them to complete their transaction then checkout would suffice for verifying quantity. I see a couple of queries in the attributes.php under modules that should be ok for checking quantity but I would like to here from someone with more time working with this area of the zencart to give me some feedback on preventing attributes from showing up if qty is zero or if this feature exists and I'm just missing something.

    Thanks

  8. #558
    Join Date
    Jan 2009
    Posts
    59
    Plugin Contributions
    1

    Default Re: Stocks by attributes

    Crin,

    it sounds likike you are having a file permissions problem. Did you correctly set all the folder permissions as specified by the original Zen Cart installation instructions?

    Kevin

  9. #559
    Join Date
    Dec 2008
    Posts
    79
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    Quote Originally Posted by kellan4459 View Post
    I've looked through the code for the stock_by_attribute add-on and it looks like the verification is done at checkout. Is there any modifications that would prevent an attribute from showing in the product listing. For example if I want to allow time slots for an event but only allow qty 1 for each time slot. I don't want the customer to have to go through checkout multiple times trying to find an open time slot. I want them to be able to only see available time slots unless someone has purchased that time slot in the time it took them to complete their transaction then checkout would suffice for verifying quantity. I see a couple of queries in the attributes.php under modules that should be ok for checking quantity but I would like to here from someone with more time working with this area of the zencart to give me some feedback on preventing attributes from showing up if qty is zero or if this feature exists and I'm just missing something.

    Thanks



    I made a single SQL statement change that does the behavior that I was looking for in my original post. After reading some posts by Grayson I think I was able to do this properly. The version of zencart I have has since replaced main_template_vars_attributes.php with just attributes.php. What I wanted to do was prevent the option from showing if the individual product-option qty was 0. I made the following modification using a LEFT JOIN and then doing a check whether the quantity is greater than zero or IS NULL within the same sql statement. If > 0 then the individual product-option has qty available. If it IS NULL then there is not an entry for this product-option and it should be using the Main Item Qty.

    Code:
    $sql=	"SELECT  pov.products_options_values_id,
            pov.products_options_values_name,
            pa.*,
            pwas.*
            FROM   " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa LEFT JOIN " . TABLE_PRODUCTS_WITH_ATTRIBUTES_STOCK . " pwas ON pwas.stock_attributes = pa.products_attributes_id
            WHERE   pa.products_id = '" . (int)$_GET['products_id'] . "'
            and    pa.options_id = '" . (int)$products_options_names->fields['products_options_id'] . "'
    		and    (pwas.quantity > 0 or pwas.quantity IS NULL)
            and    pa.options_values_id = pov.products_options_values_id
                  and       pov.language_id = '" . (int)$_SESSION['languages_id'] . "' " .
    		$order_by;


    Do any of the senior zenners see any potential problems with this? Are there other areas that could potentially be broken by this modification that I may have missed?

    Thanks

  10. #560
    Join Date
    Dec 2008
    Posts
    79
    Plugin Contributions
    0

    Default Re: Stocks by attributes

    I added the following to make the quantity show in select boxes if a quantity is specified for the individual attribute since some of my products will use the Item Quantity and not an individual item attribute quantity.


    Code:
    if($products_options->fields['quantity'])
    {
    	$products_text_to_use = $products_options->fields['products_options_values_name'] . " (" .  $products_options->fields['quantity'] . " Available)"; //yes Available is improperly hard coded 
    } 
    else 
    {
    	$products_text_to_use = $products_options->fields['products_options_values_name'];
    }
            $products_options_array[] = array('id' => $products_options->fields['products_options_values_id'],
            'text' => $products_text_to_use);

 

 

Similar Threads

  1. v139h Stocks of certain products disappearing automatically
    By Lowwi in forum General Questions
    Replies: 4
    Last Post: 11 Aug 2015, 09:09 PM
  2. Installing Stocks by Attribute
    By dragon03kf in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Oct 2008, 07:42 PM
  3. Stocks by attributes
    By hcd888 in forum General Questions
    Replies: 1
    Last Post: 12 May 2008, 08:52 AM
  4. Multiple stocks per product
    By jaycode in forum General Questions
    Replies: 4
    Last Post: 5 Aug 2007, 11:55 AM
  5. Products with attribute stocks
    By Svanis in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 5 Jul 2006, 03:19 AM

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