Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Apr 2010
    Posts
    1
    Plugin Contributions
    0

    help question Discout Group Pricing across site

    Hello, I'm looking for a way to use a customers discount pricing group to show the discounted price while they are browsing for products instead of just at the end of the checkout.

    For instance, before a customer logs in the price of a product it £100, after they login, the price shown would be £5 if they've got a 50% discount.

    Any help will be much appreciated.

    Thank you

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

    Default Re: Discout Group Pricing across site

    There isn't anything built into Zen Cart at this time to display both prices ...

    You would need to do quite a bit of custom coding to get the prices to show properly for all the prices and attribute prices ...

    If can be done, but it is not a simple fix ...

    You also need to decide are you showing the Discount Prices in addition to the regular prices or do want to show the Discount Prices instead of the regular prices ...
    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
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Discout Group Pricing across site

    Hello Ajeh,

    I think I want the same thing, as my site requires (at least) two levels of pricing - retail and wholesale. Time (budget) is very short (ridiculously small), hence I began thinking the most efficient solution would be to use group discount rather than search for and implement any wholesale pricing.

    Q. I have no issue customising code, but based on your previous comment...

    Quote Originally Posted by Ajeh View Post
    ...are you showing the Discount Prices in addition to the regular prices or do want to show the Discount Prices instead of the regular prices ...
    ...would you recommend I pursue group discount, or look for a suitable mod? I am wanting to show only the discounted price, and am happy for the order totals module to continue showing the final values as a discount. I am also using attributes, which although will be minimal, might have an impact on price.

    As stated, this is all about time, not necessarily about long-term scalability or flexibility.

    many thanks in advance.
    andrejs

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

    Default Re: Discout Group Pricing across site

    You might look at the Add On for Group Pricing or Wholesale or Retail in the Free Software Add Ons and see if any of those manage what you are trying to do ...
    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
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Discout Group Pricing across site

    after looking at how many nested functions are used to calculate pricing, i see why you would say that now.

    sorry, should have looked first : (

    thanks!
    andrejs

  6. #6
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Discout Group Pricing across site

    just wanting to know whether or not you can see any major holes in this thinking Ajeh...

    from what i've seen so far, i get the impression that the functions_prices.php file handles most of the price display occurring within ZC. it seems to me that the function zen_get_products_display_price() within this file then handles most of the price display occurring within this file, and after making the mods shown below (starting around line 200 - version 1.38a still - sorry!), i seem to have a pretty workable solution:

    PHP Code:
    //Begin Mod
    $display_normal_price my_get_wholesaleprice_function(zen_get_products_base_price($products_id));
    $display_special_price my_get_wholesaleprice_function(zen_get_products_special_price($products_idtrue));
    $display_sale_price my_get_wholesaleprice_function(zen_get_products_special_price($products_idfalse));
    //End Mod 
    all i've done is create a new function_blahblah.php file under the extra_functions directory (i assume this is where they go) and then wrap the original functions in my own custom function called my_get_wholesaleprice_function(), which is shown below. man that's a lot of functions! anyway, in case i'm doing something wildly misguided here it is...

    PHP Code:
    function oo_get_wholesaleprice($retailPrice) {
        global 
    $db;
        
    $wholesalePrice $retailPrice;
        
    $group_query $db->Execute("select customers_group_pricing from " TABLE_CUSTOMERS " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
        if (
    $group_query->fields['customers_group_pricing'] != '0') {
            
    $group_discount $db->Execute("select group_name, group_percentage from " TABLE_GROUP_PRICING "
                                            where group_id = '" 
    . (int)$group_query->fields['customers_group_pricing'] . "'");
          if (
    $group_discount->fields['group_percentage'] > 0$wholesalePrice round($wholesalePrice * (- ($group_discount->fields['group_percentage'] / 100)), 2);
        }
        return 
    $wholesalePrice;

    so far i've found only one location where this is not adequate (shopping cart), however once again, i simply wrapped my function around the query result (before taxes and so on) and everything seems hunky dory. so while i haven't tested this thoroughly, it seems on face value as if it may be sufficient for what tjsantos was looking for, assuming he/she can deal with the fact that the order total module will class it as a discount.

    as i am quite happy for the order total module to show the non-group discounted price, and then apply discount separately, as it stands, it seems to work as required. might there be some deep water i'm getting into here without knowing it yet?

    cheers
    andrejs

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

    Default Re: Discout Group Pricing across site

    zen_get_products_display_price does manage all price displays everywhere except the shopping_cart and the checkout_ pages ...

    You will really need to test if this manages everything for you, but the concept sounds right ...
    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!

  8. #8
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Discout Group Pricing across site

    thanks for the advice : )
    a testing we will go...

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

    Default Re: Discout Group Pricing across site

    Let us know how this ends up 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!

  10. #10
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Discout Group Pricing across site

    shall do

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Group Pricing by Item shows in Products, but not on site or in Price Manager
    By chrysalid in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 21 Apr 2013, 08:30 PM
  2. 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
  3. Group pricing - how to assign customer to a group?
    By vito in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 12 May 2010, 06:37 PM
  4. Special Club Pricing w/out Manual add Group Pricing
    By bumba000 in forum General Questions
    Replies: 1
    Last Post: 9 Nov 2008, 02:44 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