Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Block/Unblock Price by SKU/Category in Group Pricing

    I need to restrict access to specific products in group pricing. So if client is group a they can't see pricing for some things in group b. They can see the listing and said listing can say call for pricing.

    Where would I look to accomplish this and any help/code would be amazing.

    It can be by category if by sku is too cumbersome. So if group b then can't see category 11,13 18 or some such. And of course where to ut such logic as I could probably figure the logic although somebody can likely answer this with greater detail

    Cheers

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,873
    Plugin Contributions
    96

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    Do clients need to log into your store to see prices? If not, do the clients that are not logged in see "Call for Price" for the specific products?

    There are two functions that are associated with the "Call for Price" display:

    zen_get_products_display_price in /includes/functions/functions_prices.php
    zen_get_buy_now_button in /includes/functions/functions_general.php

    Both of these functions operate on a product_id basis, but the choice as to whether to restrict by product_id or category_id is yours ... you can always determine the category associated with a specific product. It might be less book-keeping on your end to restrict by category_id as it would be fewer values to keep track of and you'd "know" that if you assign a product to one of the restricted categories that it's 'automatically' restricted.

    Note: These are core files that you would be changing (not an override) so be sure to backup during your testing and be sure not to make the changes to a live site.

  3. #3
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    Thanks

    Here is greater detail

    (not very much stuff) Open for all to see would essentially be retail prices on products they can buy
    (a lot more stuff maybe 1,000 sku's) group a - would be a discounted price level which will get lower pricing but still can't gain access to certain products and/or categories
    (even more stuff maybe 4-5 thousand skus) group b - would be able to see everythings price and have an even lower price structure.

    It's a B2C and B2B combo site so some things are restricted to consumer thus my dilemma.

    Doing it by SKU sounds cumbersome as it could be 4-5 thousand products but categories might only be 10-15.

    Does you answer still apply given this greater detail?

    And could anyone share what exist code I can modify or known code?

    Also perhaps it's better to have a login only system and unblock like 2 categories and group a unblock maybe 5 categories and group b non blocked.

  4. #4
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    Or better yet is there something I could write into files that was triggered by the "specials" price.

    So if I set "special" price at $.07 and everything selling for that amount would automatically be blocked and marked "call for price". That might be an easier way to do this?

    with this parameter it wouldn't matter what group they were in if that group or normal "specials" price was .07 it would be blocked regardless.

    If this makes any sense. Seems like I could do SKU based pricing with one statement v 5,10, 5000 product or cat numbers
    Last edited by JimmyV; 25 Aug 2012 at 03:44 AM. Reason: addition

  5. #5
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    Seems for sure that I need to edit functions_prices.php. I have tried about a million languages and it doesn't work. Can someone give me an idea what to insert. What I wanted to do if possible is to insert a statement near top that essentially says

    if $specials price = ".03" then show the call for price tag and not the discounted price.

    if($customers_group == GROUP_PRICE_PER_ITEM1 && $specials->fields['specials_new_products_group_a_price'] = .03) {
    $special_price = $specials->fields['specials_new_products_group_a_price']; return PRODUCTS_PRICE_IS_CALL_FOR_PRICE_TEXT;

    or some such tried many things all of them break site

  6. #6
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    This is almost working something remains wrong with it. I have it pretty high up in the function_prices.php file

    The theory is if a specific price hits on specials it will instead show call for price as I don't need call for price. This I will then convert to a membership function

    // return special price only
    if ($specials_price_only==true) {
    if (zen_not_null($special_price == -1.00)) {
    return TEXT_LOGIN_FOR_PRICE_PRICE;
    if (zen_not_null($special_price)) {
    return $special_price;
    } else {
    return false;
    }
    }
    }

    essentially what I am trying to do is restrict access to specific products as to buy them (lower priced) you need to gain a higher "membership" level thus reducing your costs and gaining access to otherwise unavailable prepacks of products.

    Spent far too long on it to give up. I am using group pricing for the membership levels so tiered pricing is all good but I wanted a function that allows for upgradinging or incent folks to upgrade.

  7. #7
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    Two Years later and I need this again never figured it out before.

    I want to make it call for price is product price = specials price by group or by setting a specific price that keys a call return. The above solutions I revisited and have not gotten them to work.

    Any ideas?

  8. #8
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    The Twitch Modules will do this for guest/wholesale/retail and now customer category/inherited product restrictions.

    There's a logical path as a guest, retail or wholesale customer that keeps the Zen Cart pricing functions in tack and filters the output to be unique to the customer that's logged in/or not logged in.

    Changing the product pricing display will work to some extent but what you're attempting to do needs to start deeper in the code to ensure the prices are all sent to the cart correctly based on the customer. Sales, Specials, Discounts and the regular pricing matrix need to be given the correct data to calculate correctly in the cart especially when taxes are added.

    Depending on the group pricing module you have installed there may need to be some custom code that bridges the pricing correctly.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  9. #9
    Join Date
    Feb 2008
    Location
    Philadelphia
    Posts
    290
    Plugin Contributions
    3

    Default Re: Block/Unblock Price by SKU/Category in Group Pricing

    OK I am going to look at this code.

    I am using group pricing. The problem I currently have / have had... I'd like to say Group A can see this items price but Group B gets a call for price.

    I am happy to do this either by using trigger price in the db or using a more robust solution. The thing about price based trigger is it's very easy to populate this and unpopulate it in seconds for thousands of items v having a gui and I need to access each product it's too cumbersome for literally 15,000 products with varying levels of access.

    My theory was to make as above .03 cents trigger a call for price but I never figured the call correctly.

 

 

Similar Threads

  1. v138a Link directly to price level with Group Pricing
    By RFree190 in forum General Questions
    Replies: 2
    Last Post: 25 Oct 2013, 07:46 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. Mass price change not group pricing
    By darktowerhobbies in forum Customization from the Admin
    Replies: 1
    Last Post: 31 Mar 2008, 11:14 AM

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