Page 2 of 13 FirstFirst 123412 ... LastLast
Results 11 to 20 of 123
  1. #11
    Join Date
    Sep 2007
    Location
    Melbourne Australia
    Posts
    60
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    OK . . . .

    Got the above issue worked out - had the special turned on - which affects some of the other functionality with this mod - and a decrease in value from attributes, which has to be a + for the mod to work.


    BUT . . . I am still getting an addition problem with attributes.


    If the attribute does not change the $ value all is OK.

    If the attribute does change the $ value the shopping_cart (page and side box) display show only the "item base price" (wihtout the attribute change to the item price).

    Also, if you are logged in as a dicount group member the shopping_cart (page and sidebox) list the adjusted total at the non-discount attribute amount.

    ALL is fine when it gets to the checkout pages, but those values can't be transposed to the shopping cart pages.


    The value that is not being calculated correctly is
    $cartShowTotal
    $product['productsPriceEach']
    $product['productsPrice']

    Has anyone had similar issues and come up with a fix, or does anyone know how to fix this?


    Perhaps it is just as tweak in ../includes/classes/shopping_cart.php ???


    Any help greatly appreciated.

    Thanks, Max

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

    Default Re: Online Group Pricing

    I have isolated the issue to what appears to be a single error, which is the item and total $ values in the shopping_cart page and shopping_cart side box.

    What “appears” to be happening in the math is that the shopping_cart total is using the correct group discounted value for the items base price, however the attribute price is being added at the full price (not the group discounted amount). The value displayed for the item in the shopping_cart is the correct group discounted value for the items base price, but without any adjustment for the attributes.

    --------------------

    Explanation of attached pictures as an example of the problem:

    In the pictures attached as an example, the shopper is a wholesale client and has a group discount of 50% discount off the database prices.

    The database price for “alstroemeria” is $7.00, but with the 50% group discount the price is $3.50 per item, so 10x is $35. The attribute “Red / Burgundy” has an attribute +PriceFactor of .01 (or 10%), which increases the per item group value by $0.35 to $3.85, so the item should display at $3.85 and the total for 10x should display at $38.50. The shopping_cart total displays $42, which appears to be the group discount base $35 PLUS the non-discount attribute value, which for 10x would be $7 ($0.70 per item).

    When we get to the checkout_ pages the $ totals (these screens do not have item values), including the attribute calculation are correct, so it seems the math in this area is working OK.

    Also, after the order is confirmed and we look at the invoice from the admin side all the figures are correct, including the per item $ value displaying correctly at $3.85 (with the discounted attribute amount).
    --------------------

    I hope someone can provide some assistance on this and that I have provided enough information for you to be able to make an “easy” evaluation of a fix.

    Perhaps also a (not) returned value from "zen_display_group_pricing" in functions_prices.php ????
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	shopcart_attributes not in price & not discounted in subtotal.jpg 
Views:	278 
Size:	12.3 KB 
ID:	4189   Click image for larger version. 

Name:	checkoutconfirmation_correct totals with attributes.jpg 
Views:	272 
Size:	16.9 KB 
ID:	4190   Click image for larger version. 

Name:	super_invoice_showing attribute pricing item and total all working correctly.jpg 
Views:	277 
Size:	11.1 KB 
ID:	4191  


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

    Default Re: Online Group Pricing - CODE FIX

    There is an erros in the code, which was isolated by someone doing another paid mod for me. The error, which can be fixed really easily is:

    file: ../includes/modules/pages/shopping_cart/header_php.php

    around line 281:
    //OGP start
    // $productsPrice = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');

    $productsPrice = zen_get_products_display_price((int)$products[$i]['id'],(int)$products[$i]['quantity']);
    // $productsPriceEach = $currencies->display_price(zen_get_products_display_price((int)$products[$i]['id']), zen_get_tax_rate($products[$i]['tax_class_id']), 1) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');

    $productsPriceEach = zen_get_products_display_price((int)$products[$i]['id']);
    //OGP end

    Change to:


    $productsPrice = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');


    $productsPriceEach = $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');


    THIS ALSO FIXES THE ADDITION PROBLEMS ON THE SHOPPING CART PAGE. The shopping cart will now display the correct line items amount, reflecting the actual cost to the customer.

    Hope fully if anyone else has noticed this problem this snippet of code will fix their problems also. . . .

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

    Default Re: Online Group Pricing

    Also . . .

    This file and the problem seem to be isolated to OGP 0.11 & 0.12 The file had disappeared from the contribution in 0.21 - guess it still works??

    What this means however, is that even if you install the new contribution the old files will still be there causing the problem.

    Perhaps installing the new contribution and removing (or renaming) the old files that aren't there on the new one will fix the problem. Otherwise, just update the file as above to fix problems.

  5. #15
    Join Date
    Feb 2005
    Location
    New Jersey
    Posts
    646
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    I am getting en error when anyone that is assigned to a group discount is online. In admin when you view who's online or user tracking, I get the following error message:

    Fatal error: Call to undefined function zen_display_group_pricing() in /home/mysite/public_html/includes/classes/shopping_cart.php on line 1076

    Any ideas anyone???

    Thanks,
    Kelly

  6. #16
    Join Date
    Apr 2009
    Posts
    155
    Plugin Contributions
    1

    Default Re: Online Group Pricing

    Quote Originally Posted by sleepless View Post
    I am getting en error when anyone that is assigned to a group discount is online. In admin when you view who's online or user tracking, I get the following error message:

    Fatal error: Call to undefined function zen_display_group_pricing() in /home/mysite/public_html/includes/classes/shopping_cart.php on line 1076

    Any ideas anyone???

    Thanks,
    Kelly
    Got my invitation to this party a little late. LOL! Same thing was happening to me . . . of course! ;)

    The fix is to uncomment the code on the indicated line number in includes/classes/shopping_cart.php.

    Hope this helps someone! :)

    PHP Code:
            $special_price zen_get_products_special_price($prid);
            if (
    $special_price) {
            
    $products_price $special_price;
            } 

  7. #17
    Join Date
    Feb 2009
    Posts
    15
    Plugin Contributions
    0

    Have a Drink Re: Online Group Pricing

    ZenCart info:
    Zen Cart 1.3.8a
    Patch: 1::
    Database Patch Level: 1.3.8

    Security patch from June applied

    There are a number of add-ons, including Admin_Profiles, Sales Report, CrossSell_Advanced, Newsletter discount, Zen Lightbox, hmmm, and others. None of these add-ons are recent.

    So, I'm having trouble with this Online Group Pricing Add-On.

    1. I backed up the database
    2. I backed up the relevant files
    3. I applied the sql
    4. I ftp'd the files
    5. I went to log in to the admin page, and now receive this special error message:

    Fatal error: Cannot redeclare zen_update_products_price_sorter() (previously declared in /path/to/my/admin/includes/functions/general.php:2525) in /path/to/my/admin/includes/functions/functions_prices.php on line 1334

    I'm looking for suggestions what to do next to fix this. Luckily, I have the luxury of a Sandbox to test in, so this didn't happen in the live shop.

    deb

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

    Default Re: Online Group Pricing

    Quote Originally Posted by darrell View Post
    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!
    I contacted a zen cart programmer named Andreas who wrote a mod that worked perfectly for me using 1.3.7.1. I have not upgraded to 1.3.8 so I cannot tell you if it will work on the latest version. His email address is: a DOT fragner AT inode DOT at
    He was very responsive and the price was very reasonable. Since the program has already been written, I am sure he will work with you on getting it to work on the new version.

    Good luck!
    H. Light
    Florida

  9. #19
    Join Date
    May 2009
    Posts
    42
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    Quote Originally Posted by ToniScraparoni View Post
    Got my invitation to this party a little late. LOL! Same thing was happening to me . . . of course! ;)

    The fix is to uncomment the code on the indicated line number in includes/classes/shopping_cart.php.

    Hope this helps someone! :)

    PHP Code:
            $special_price zen_get_products_special_price($prid);
            if (
    $special_price) {
            
    $products_price $special_price;
            } 
    Followed your advise but it didn't work for me....the code you say to uncomment is after the place where the error occurs

  10. #20
    Join Date
    May 2009
    Posts
    42
    Plugin Contributions
    0

    Default Re: Online Group Pricing

    Turned on MSRP..but it displays all the time...How do you turn it off for non group members (normal customers)? As it is it displays the same price twice...duh....

 

 
Page 2 of 13 FirstFirst 123412 ... 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