Page 355 of 356 FirstFirst ... 255305345353354355356 LastLast
Results 3,541 to 3,550 of 3558
  1. #3541
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by gemohler View Post
    Last question, then I have a lot of other work to do.

    How do I set "No, Do not show Quantity Box" in EP?
    Question is more applicable for the EP4 thread; however, the specific products table field to "not show the quantity box" is: products_qty_box_status
    That field can be added to your export/import of EP4 fields by updating the user defined fields within the configuration. In your import/export file, the field will be shown as: v_products_qty_box_status; however, the user defined fields should just identify the field as it is listed in the products table: products_qty_box_status
    Then, setting that value to 0 will prevent the display of the quantity box on the product information page (when considering a Zen Cart standard/base template). Templates could be designed that exclude this feature/capability so if such is not working in your cart, then please attempt to use one of the Zen Cart default templates for testing and discovering where the problem is.

    In a standard Zen Cart template, the same effect can be made by restricting the maximum product quantity to 1. Note though that these two characteristics may operate differently throughout the store. For example, having a product quantity of only 1 being added from the product information page, means that for each add to the cart only a quantity of 1 is added, but the total quantity at checkout could exceed 1. Limiting a maximum product quantity to 1 is expected to prevent the cart from having any quantity larger than 1 meaning ultimately checkout of that product can be of only a quantity of 1. (While not necessarily easily done in the base code, if a partial quantity of the product can be incorporated, then the expectation of having a maximum quantity of 1 is that at no time could any portion of a quantity added to the existing amount expected to be able to exceed 1.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #3542
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by lsde View Post
    Current version 1.5.7b
    Using 1 option name with "SBA Select List (Dropdown) Basic" and I would like to rearrange how the quantity and price show in the dropdown. Current order is option value + stock qty + price. Would like to have it read option value + price + stock qty.
    Pretty sure I need to edit class.products_with_attributes_stock.php not sure where. Any guidance would be appreciated.
    Thanks
    lsde, I apologize for two things, one in attempting to create my post about the quantity box, I lost what I had researched and begun creating to answer your question, two is that I had not completed that response in a more timely manner.

    Basically, the stock quantity text is generated and incorporated in $PWA_STOCK_QTY within includes/classes/observers/class.products_with_attributes_stock.php.
    The "safest" way that I see to resequence the data so that the newly added stock quantity does not appear in other potentially undesirable areas, would be to add an additional notifier to your copy of includes/modules/YOUR_TEMPLATE/attributes.php after this code group:
    Code:
            $zco_notifier->notify('NOTIFY_ATTRIBUTES_MODULE_ORIGINAL_PRICE', $products_options->fields, $products_options_array, $products_options_display_price, $data_properties);
    
    
    
    
            $products_options_array[count($products_options_array) - 1]['text'] .= $products_options_display_price;
    to look something like this:

    Code:
            $zco_notifier->notify('NOTIFY_ATTRIBUTES_MODULE_ORIGINAL_PRICE', $products_options->fields, $products_options_array, $products_options_display_price, $data_properties);
    
    
    
    
            $products_options_array[count($products_options_array) - 1]['text'] .= $products_options_display_price;
    
    
            $zco_notifier->notify('NOTIFY_ATTRIBUTES_MODULE_AFTER_ORIGINAL_PRICE', $products_options->fields, $products_options_array, $data_properties);

    The reason is this: The developers and associated code maintainers have merged in the price to the notifier: NOTIFY_ATTRIBUTES_MODULE_ORIGINAL_PRICE, such that if $products_options_display_price is modified to include your desired stock quantity at the end, it will impact later usage of that variable. Further there is no notifier before the next addition of text to $products_options_array[nth_value]['text'] to force/guarantee that the quantity would be the next value added because weight information is possibly the next content to be added to that array value. Then if weight information isn't added, the next existing code opportunity is to use the observer: NOTIFY_ATTRIBUTES_MODULE_BEFORE_ASSEMBLE_OUTPUTS with a forced global in that observer to update that text or for specifically observing about 'SBA Select List' to do similar in the observer for NOTIFY_ATTRIBUTES_MODULE_DEFAULT_SWITCH (again recognizing that this addition would be after any expected addition of weight related text).

    If the text is added directly to the price related information, then note that $products_options_details and $products_options_details_noname will each also include that additional information and that there are unevaluated downstream affects of that additional content.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3543
    Join Date
    Nov 2005
    Location
    France
    Posts
    582
    Plugin Contributions
    8

    Default Re: SBA Select List (Dropdown) Basic

    Is there a simple switch to disable a selected attribute being shown as the product image in the shopping cart?

    I didn't see anything in admin for it so if I missed it, either I'm losing the plot or I need to update the prescription on my glasses!
    Managing Director of https://jsweb.uk

    Zen Cart developer since 2009

  4. #3544
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by strelitzia View Post
    Is there a simple switch to disable a selected attribute being shown as the product image in the shopping cart?

    I didn't see anything in admin for it so if I missed it, either I'm losing the plot or I need to update the prescription on my glasses!
    To confirm terminology and request, it's OK to swap the image on the product page, but not on the shopping cart page? Is that the request?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #3545
    Join Date
    Nov 2005
    Location
    France
    Posts
    582
    Plugin Contributions
    8

    Default Re: SBA Select List (Dropdown) Basic

    I don't need to swap images on either page. The attribute images are simply a graphical display of nicotine strength in e-liquids. The same attribute images are used across all products so disabling image swap completely would be the preferred method.
    Managing Director of https://jsweb.uk

    Zen Cart developer since 2009

  6. #3546
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by strelitzia View Post
    I don't need to swap images on either page. The attribute images are simply a graphical display of nicotine strength in e-liquids. The same attribute images are used across all products so disabling image swap completely would be the preferred method.
    Then yes, SBA Display Attributes Images set to 0 would accomplish not swapping. That configuration setting should have been added to configuration->Stock during install/upgrade.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #3547
    Join Date
    Nov 2005
    Location
    France
    Posts
    582
    Plugin Contributions
    8

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by mc12345678 View Post
    Then yes, SBA Display Attributes Images set to 0 would accomplish not swapping. That configuration setting should have been added to configuration->Stock during install/upgrade.
    And therein lies the problem. As it was an image related change I was looking under the 'Images' configuration options. TBH it never even occurred to me to look under 'Stock'.

    Thanks for the quick response mcnumbers
    Managing Director of https://jsweb.uk

    Zen Cart developer since 2009

  8. #3548
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: SBA Select List (Dropdown) Basic

    Quote Originally Posted by strelitzia View Post
    And therein lies the problem. As it was an image related change I was looking under the 'Images' configuration options. TBH it never even occurred to me to look under 'Stock'.

    Thanks for the quick response mcnumbers
    In development when there was a lot spoken about configuration listing assignment, tried to keep as much in one place as reasonably possible. Haven't gone back to revisit and not sure what additional value to users there would be.

    Had toyed with idea of a unique configuration menu just for SBA, a separate admin page, mixing into default areas, etc... sorry about the confusion caused in this case, but glad to help!
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #3549
    Join Date
    Jun 2009
    Location
    Europe
    Posts
    58
    Plugin Contributions
    1

    Default Re: SBA Select List (Dropdown) Basic

    [ZC v1.5.8][Bootstrap v3.5.0]

    I have a problem of image swapping on the product info page for Bootstrap template.
    When I switch to other templates, e.g. Classic Contemporary Green or Responsive Classic Template, image swapping works fine.

    I have the hunch that it is due to includes/modules/bootstrap/attributes.php
    because on an earlier version of this file (later overwritten) mc12345678 wrote in the info-header:

    Code:
     * attributes module
     *
     * Prepares attributes content for rendering in the template system
     * Prepares HTML for input fields with required uniqueness so template can display them as needed and keep collected data in proper fields
     *
     * @package modules
     * @copyright Copyright 2003-2018 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: mc12345678 Fri Nov 9 21:03:09 2018 -0500 Modified in v1.5.6 $
     * 
     * Stock by Attributes 1.5.4 : mc12345678 16-01-02
     * Attribute image replaces main product image on selecting attribute mc12345678 16-12-09
     * Incorporated to support ZC 1.5.1 and up when using SBA.
    So, obviously it is needed for image swapping.
    However, there are far too many changes in the attributes file that I do not know where to start.
    Is there any adapted version of the bootstrap's or can anyone guide me what essential changes to make in the attributes.php ?

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

    Default Re: SBA Select List (Dropdown) Basic

    I don't recall at what version of Zen Cart, but at that point which includes 1.5.8 (back to some version) the attributes file did not require override. The base 1.5.8 version is sufficient. Further the Javascript/jquery involved does not override the associated actions.

    My suggestion would be to consider inspecting your page(s) for html and/or Javascript validation. The template may not validate and cause swap issues. Another may be that expected tags may have been altered.

    As normally is presented in the posting tips, for others to independently see the on page issues, an example link should be given. If another page works within the same template then that should be shared as well. Of course break it up as necessary to prevent indexing or that sort of web action.

    Then lastly, suggest identifying versions of things installed.
    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