Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default [Not a Bug] Negative attribute price factor not working

    Running 1.50 BETA 20110828. I have a product defined with a negative attribute price factor and while the price factor displays as a negative value in my admin ... it was not being applied in my storefront (also verified on a clean install of the beta).

    The fix was to make the following four changes to /includes/classes/shopping_cart.php:

    Code:
    //           if ($attribute_price->fields['attributes_price_factor'] > 0) {  /* Line 758 */
               if ($attribute_price->fields['attributes_price_factor'] != 0) { 
    
    //            if ($attribute_price->fields['attributes_price_factor_onetime'] >0) {  /* Line 784 */
               if ($attribute_price->fields['attributes_price_factor_onetime'] != 0) {  
    
    //          if ($attribute_price->fields['attributes_price_factor'] > 0) { /* Line 927 */
              if ($attribute_price->fields['attributes_price_factor'] != 0) {
    
    //          if ($attribute_price->fields['attributes_price_factor_onetime'] > 0) { /* Line 1011 */
              if ($attribute_price->fields['attributes_price_factor_onetime'] != 0) {

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: 1.50 Beta: Negative attribute price factor not working

    What values were you using?

    Did you have this issue in v1.3.9h or are you just testing the fun stuff?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: 1.50 Beta: Negative attribute price factor not working

    I defined a dropdown attribute name with two attribute values:

    "Regular" ... using all defaults
    "Price Factor" ... setting price factor to -0.5 and offset 0

    The same problem exists in the v1.3.9h version of shopping_cart.php (seen by inspection); I'm actually defining a new storefront via the beta.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: 1.50 Beta: Negative attribute price factor not working

    And if used, as intended, with:
    One Time Factor: 1
    Offset: 1.5

    does it now work correctly on both Admin and Catalog?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: 1.50 Beta: Negative attribute price factor not working

    Ajeh, I plugged in the numbers like you said and the result is a 1/2 off value (as I wanted/expected).

    If a negative value of the 'price_factor' isn't supposed to be used, why is the value allowed to be entered in the admin?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Negative attribute price factor not working

    There are 10,000 safeties that "could" be added to Zen Cart ... not all of them have been added, at this time ...

    Thanks for the update that this is working for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. Replies: 17
    Last Post: 21 Mar 2010, 05:57 PM
  2. "Attribute Option and Option Value Do NOT Match" when trying to use price factor
    By helkyrie in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 23 Nov 2009, 04:41 PM
  3. Negative price factor not working
    By ctlajoie in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 19 May 2009, 05:31 PM
  4. [Done v1.3.9] Negative price factor does not work
    By ctlajoie in forum Bug Reports
    Replies: 1
    Last Post: 19 May 2009, 02:44 PM
  5. How to make Radio Attribute with Offset factor but not add up the price
    By maximist in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 26 Mar 2008, 12:16 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