Page 1 of 13 12311 ... LastLast
Results 1 to 10 of 123
  1. #1
    Join Date
    Feb 2005
    Posts
    4
    Plugin Contributions
    0

    cart error Online Group Pricing

    I am trying to get the mod Online Group Pricing to work on the latest and greatest version of Zen Cart and I am having a problem. It is applying the group discount twice - once during product browsing and once during checkout.

    I have tried just installing it, carefully patching the mod with the latest Zen Cart files, and running it all back at the 1.3.0 version for which the mod was designed. The mod works fine back at version 1.3.0, but no matter what I try, on the newest Zen version it applies the discount twice.

    Unfortunately my customers, like most people, except to see their discounted price while browsing instead of just at the checkout. So, help getting this figured out would be greatly appreciated.

    Attached is my patched version of the mod.

    Thanks all!
    Attached Files Attached Files

  2. #2
    Join Date
    May 2007
    Location
    Port Charlotte, FL
    Posts
    125
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    I am running the latest version of zencart on two sites and would VERY much like to install this feature. I will watch this thread but if you find a solution, would you be kind enough to let me know the fix? I have contacted my web person, and have asked him to see if he can find a solution. If he does I will let you know.

    Harold
    H. Light
    Florida

  3. #3
    Join Date
    Feb 2005
    Posts
    4
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    I figured it out. Actually, a really easy fix - just hard to find.

    I have been planning on get a fix posted, but have been just too busy. The mod contains zen files that have since been updated and I need to seperate the mod from the old zen files and then apply the mod to the newest zen files. (I hope that made sense.)

    I will try to get it 'packaged up' this weekend. Send me a private message with your email - I would like some one else to test it before I post it.

    Thanks
    Last edited by darrell; 19 Jan 2008 at 04:02 AM.

  4. #4
    Join Date
    Feb 2005
    Posts
    4
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    Here is my fix to it. Hope it works for you. My change is in the ot_group_pricing.php file.

    Darrell
    Attached Files Attached Files

  5. #5
    Join Date
    Sep 2007
    Location
    Melbourne Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    Hi Darrell,

    Your upgraded version of OGP works perfectly.

    I installed on a new 1.3.8a install with a heap of other mods installed and not even a whisper of a problem

    I think this is safe to stick up as a new version in the downloads section.

    Well done!!

  6. #6
    Join Date
    Feb 2005
    Location
    Italy
    Posts
    199
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    I found a bug in this contrib.

    There's a problem with rounded prices (maybe only when product price has more than 2 decimals and only for certain values).

    Example:

    I had a product with base price 1.033 and a discount group ( well, not discount, the opposite) with 10% (so -10%, expecting the price to be raised by 10%)

    So 110% of 1.033 is 1.1363, that rounded by 2 decimals should be 1.14

    Everywhere in Zen Cart it results 1.14, but not in shopping cart, product info and so on (obviously after having installed this contrib) where it results 1.13 (you could say, wow a cent... yes in effect it is not really a matter of loosing money or something, but the client who look at this, doesn't understand, expecially if he is buyng 300 products (why 3 dollars / euro difference between product total and subtotal?).

    So I looked at the function_prices.php file, into the function zen_get_products_display_price that has been modified by this contrib and found this code:

    $display_normal_price = round(zen_get_products_base_price($products_id),2);
    $display_special_price = round(zen_get_products_special_price($products_id, true) * $products_qty,2);
    $display_sale_price = round(zen_get_products_special_price($products_id, false) * $products_qty,2);
    //OGP end
    $show_sale_discount = '';
    // echo " -- " . $display_normal_price . " --";
    //OGP start
    $display_normal_price = round(zen_display_group_pricing($display_normal_price,$products_qty),2);


    look at first and last lines, we have 2 rounding, so I simply removed the round form the first line and now my prices are correct.

    Byez
    Paolo De Dionigi
    Co-maintainer of Zen Cart Italia

  7. #7
    Join Date
    Feb 2005
    Posts
    4
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    Nice catch s_p_ike! Bad math/code is a big deal - no matter how small the money amount.

    If you have installed this mod, to make this fix -

    Around line 205 of /includes/functions/functions_prices.php find:
    Code:
    $display_normal_price = round(zen_get_products_base_price($products_id),2);
    Change to:
    Code:
    $display_normal_price = zen_get_products_base_price($products_id);

    I attached new install files with this fix integrated.

    Honestly, I do not have the desire to be the maintainer of this mod. My step-mother needed it and I fixed it for her and shared with the Zen community. I would love it it if some one stepped up and took care of this simple and yet obviously needed modification. Until then - I will do what I can to keep it going.

    Thanks all.
    Attached Files Attached Files

  8. #8
    Join Date
    Feb 2005
    Location
    Italy
    Posts
    199
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    Good work darrel ;)

    In effect, the dev team could consider to include this mod in the official distribution, maybe with an option in configuration to activate it or not (ok this would require an extra bit of coding...), since I believe a lot of e-commerce need group pricing and almost all b2b need that their customers can see only the prices addressed to them.
    Paolo De Dionigi
    Co-maintainer of Zen Cart Italia

  9. #9
    Join Date
    May 2007
    Location
    Port Charlotte, FL
    Posts
    125
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    I contacted the author of the mod several months ago and I had him update a version for me. I have been using it without a problem since. If you encounter further problems, you may want to contact him directly.
    He is a very nice guy to work with and really knows what he is doing.
    H. Light
    Florida

  10. #10
    Join Date
    Sep 2007
    Location
    Melbourne Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    Copy of email I sent to a.fragner (contributor of the contribution).

    If anyone else can offer any siggestions or assistance that would be great.

    ########################################___

    Andreas,

    Thanks for the great mod for Zen Cart and the updated files to work with attributes.

    I recently updated to the latest version from the Zen downloads section: V0.21

    I am working with ZenCart1.3.8a and have had no problems as far as compatibility is concerned. All functions work great apart from a couple of niggly issues.

    It would be greatly appreciated if you could provide some help with two issues (the first being the most important).

    1. Attributes:
    a) When there is one attribute the application works beautifully. ref: http://www.floriculture.com.au/index...roducts_id=168
    b) When there are two attributes to a product the math for the cart total appears to be incorrect when the product is added to the cart. The attributes I am using don’t particularly have a value, so the prices and weights values (in attributes controller) are usually set at zero. When this is the case the product displays the correct price, but when added to the cart returns a zero balance in the shopping cart total, however the lines in the cart display correctly. I have played with the attribute price values to get a work around, but nothing I am doing seems to work. Currently the value of the first attribute is set at price factor 1.0 offest 0.5, with the values of the second attribute set at the default zero. This has the same as the above where correct, however always displays the 50% discount group rate in the cart total regardless of the group discount rate.
    c) From all of this I think it must be the math for the cart total that is not working correctly, however your knowledge of these functions is a lot better than mine.
    d) ref: http://www.floriculture.com.au/index...roducts_id=103

    2. Specials:
    a) You had a note to contact you to enable GroupPricing also at special prices, so I am contacting you about that also.

    I hope you are able to assist with the above issues/requests, as we work extensively with group pricing for a number of different customer levels with our site. Also, if we can get this module to work well with attributes it will make management of our products a LOT easier.

    Thank you very much in advance for any help you can provide.

    ########################################___

    Again, any help anyone can provide would be greatly appreciated.

 

 
Page 1 of 13 12311 ... LastLast

Similar Threads

  1. online group pricing vs group pricing per item working with sale maker
    By giftsandwhatnot in forum Addon Payment Modules
    Replies: 1
    Last Post: 24 Oct 2011, 09:22 AM
  2. Online Group Pricing
    By high2K in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 25 Oct 2007, 12:12 PM
  3. Online Group Pricing
    By flightoffancy in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 27 Jul 2007, 09:21 PM
  4. Who is online...side admin vs online group pricing mod
    By csfound in forum General Questions
    Replies: 8
    Last Post: 18 Jul 2007, 04:27 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