Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    6,972
    Plugin Contributions
    63

    Default Can there be more than one "Special" for a product?

    From inspecting the code, it seems like the answer to the question in the title is "No". If that's the case, why doesn't the specials table simply use the associated products_id as its primary key?

    I ask because a client has, over the past year, run into non-reproducible conditions where adding a special price (via products price manager) winds up adding the special twice ... resulting in the product being displayed twice on various storefront listings.

    If each product can have only one special, I was going to simply modify the specials.php handling for the insert action to remove any previous record prior to the insert. If multiple specials are allowable, the solution gets a bit more tricky.

  2. #2
    Join Date
    Jul 2012
    Posts
    11,619
    Plugin Contributions
    13

    Default Re: Can there be more than one "Special" for a product?

    Somewhat missing the benefit(s) of the specials table being populated with data that remains present for a given products_id and can be toggled between enabled/disabled either manually or perhaps in this case automatically without "pre-planning" (a situation that could be bettered by improved/modified admin/specials handling/review).

    What if one were to have a special for a product implemented today, but in 7 days the special was to reduce the price another 10% or to some other "value", that second special for the one product could not be even entered let alone implemented until the first had been "removed". Should perhaps only one be "active" at a time? Would say that it is a good idea, with consideration of current implementation of specials, but there could also be an additional "logic" applied of any numerous factors (last one implemented, combining two or more but then how, etc). As to "removal" (deletion instead of deactivation) of a special, some places may run a "routine" special each year and, although the table does not currently support a "repetitive" configuration, by the special remaining available in the table the date range can be updated which then would trigger the appropriate re-activation of the special at the appropriate date/time.

    It seems that the current implementation depends on the store owner "managing" the specials that are in place and preventing a product having two or more active specials at one time, or if protection is offered on the "front end" (admin entry area) that something else permitted the introduction of a special to the database table without similar/appropriate discrimination.
    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. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    6,972
    Plugin Contributions
    63

    Default Re: Can there be more than one "Special" for a product?

    In the current implementation of "specials" (through ZC 1.5.5e), if a product has a special its products_id is no longer presented in the drop-down list of products; that's what led me to my initial assertion (one special/product).

    I agree with you, mc12345678, that with the start/end dates it seems like you should be able to have multiple specials "staged" for a given product but that's not how it currently works.

  4. #4
    Join Date
    Mar 2006
    Location
    Rosebud, Victoria, Australia
    Posts
    269
    Plugin Contributions
    2

    Default Re: Can there be more than one "Special" for a product?

    Also you Install a special if none exists for a product, or edit it if one does.
    Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    5,617
    Plugin Contributions
    211

    Default Re: Can there be more than one "Special" for a product?

    Specials can be date-ranged so you could have multiple entries for a single product id.
    That Software Guy, Plugin Moderator. Store: Zen Cart Modifications
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    6,972
    Plugin Contributions
    63

    Default Re: Can there be more than one "Special" for a product?

    Quote Originally Posted by swguy View Post
    Specials can be date-ranged so you could have multiple entries for a single product id.
    I see that in the GUI, but it's a different story in the "core" code.

  7. #7
    Join Date
    Jul 2012
    Posts
    11,619
    Plugin Contributions
    13

    Default Re: Can there be more than one "Special" for a product?

    I agree with lat9 regarding the current implementation which is the same for at least as far back as ZC 1.5.3 as I found in the admin panel when attempting to provide multiple specials for a given products_id. That being that the admin handling is of a basic nature allowing addition/implementation of one special for one product regardless of it being active or disabled.

    This indicates that to support what we have described of even a date ranged special requires a separate tool to populate the specials table and that the base install doesn't do anything "unique" if the database is found to have more than one special applied to the product and in particular if two or more specials are active (on purpose or accident) during the same time period.
    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

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    5,617
    Plugin Contributions
    211

    Default Re: Can there be more than one "Special" for a product?

    Quote Originally Posted by lat9 View Post
    I see that in the GUI, but it's a different story in the "core" code.
    Remember that the status of a special is set in the init code (init_includes/init_special_funcs.php) so as long as your date ranges don't overlap, you could have multiple specials for a single product.
    Last edited by swguy; 17 Mar 2017 at 02:14 AM.
    That Software Guy, Plugin Moderator. Store: Zen Cart Modifications
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    6,972
    Plugin Contributions
    63

    Default Re: Can there be more than one "Special" for a product?

    Quote Originally Posted by swguy View Post
    Remember that the status of a special is set in the init code (init_includes/init_special_funcs.php) so as long as your date ranges don't overlap, you could have multiple specials for a single product.
    ... and could is the operative word! The specials code in the admin (the core version anyway) will not allow multiple specials to be assigned to a single product via its GUI.

  10. #10
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    5,617
    Plugin Contributions
    211

    Default Re: Can there be more than one "Special" for a product?

    You're right - the admin/specials.php passes $specials_array which is a list of things to be excluded when it calls zen_draw_products_pull_down. Have you tried resetting $specials_array, i.e.

    Code:
    $specials_array = array();
    to see what happens? I think it might work.
    That Software Guy, Plugin Moderator. Store: Zen Cart Modifications
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 9
    Last Post: 3 Feb 2015, 09:36 PM
  2. Is there an Addon for "MULTI" Group Pricing Options? (more than 2)
    By jnspire in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 9 Apr 2011, 10:15 AM
  3. Adding more than one button "add to cart" on product info page....
    By Celebrimbor in forum General Questions
    Replies: 14
    Last Post: 4 Feb 2010, 05:41 PM
  4. how can i upolad more than one pics for one product?
    By blueonline in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 24 Jun 2008, 01:14 AM
  5. More than one type of "category"
    By monkeyjr47906 in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 20 Nov 2007, 11:16 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