Thread: DUAL Pricing v2

Page 105 of 151 FirstFirst ... 55595103104105106107115 ... LastLast
Results 1,041 to 1,050 of 1503
  1. #1041
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    I am back on trying to find a solution for my needs. A previous post is quoted below. Basically I have Dual Pricing & respective fixes implemented and working fine. However I am really focused on the wholesale side. The retail prices listed are more of a service. When I put something on sale, it is to the wholesale customer which is not happening as stated in the quoted post. When I go to the admin and set up a sale price, i need it to apply to the wholesale price and only show when logged in as a wholesale customer. Any thoughts?

    Thanks

    Quote Originally Posted by idc1 View Post
    The below is from edingtons fix:

    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
    $special_price = false;
    } else {

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

    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
    return false;
    } else {

    ---------------------------------------------------------------------
    The code works as follows:
    When logged in - sales price does NOT display.
    When not logged in - sales price displays.

    I have yet to get the reverse to happen. I want:
    When logged in - sales price displays.
    When not logged in - sales price does not display.

    How can I make this happen? If I change
    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' )

    to

    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] = '0' )

    That made the sales price display both when logged in and not logged in.
    ZC 1.5.5
    Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3

  2. #1042
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: DUAL Pricing v2

    This is untested, but should work:

    Code:
    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] == '0' ) {

  3. #1043
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    Quote Originally Posted by jackie.taferner View Post
    This is untested, but should work:

    Code:
    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] == '0' ) {
    Thank you for the input Jackie. I tried it with no success. I also tried several other combinations...I found none of them to work either. Some of the things I attempted are noted in red. I believe this is the only portion in includes/functions/functions_prices.php to control when to show sales price. Any other suggestions?

    //get specials price or sale price
    function zen_get_products_special_price($product_id, $specials_price_only=false) {
    global $db;
    $product = $db->Execute("select products_price, products_model, products_priced_by_attribute from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");

    if ($product->RecordCount() > 0) {
    // $product_price = $product->fields['products_price'];
    $product_price = zen_get_products_base_price($product_id);
    } else {
    return false;
    }

    $specials = $db->Execute("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$product_id . "' and status='1'");

    //I tried making next line ==0, !=1
    if ($_SESSION['customers_wholesale'] && $_SESSION['customers_wholesale'] != '1' ) {
    //I tried making next line =true
    $special_price = false;
    } else {


    if ($specials->RecordCount() > 0) {
    // if ($product->fields['products_priced_by_attribute'] == 1) {
    $special_price = $specials->fields['specials_new_products_price'];
    } else {
    $special_price = false;
    }
    }

    if(substr($product->fields['products_model'], 0, 4) == 'GIFT') { //Never apply a salededuction to Ian Wilson's Giftvouchers
    if (zen_not_null($special_price)) {
    return $special_price;
    } else {
    return false;
    }
    }

    // return special price only

    //I tried making next line ==0, !=1
    if ($_SESSION['customers_wholesale'] && $_SESSION['customers_wholesale'] != '1' ) {
    return false;
    } else {

    if ($specials_price_only==true) {
    if (zen_not_null($special_price)) {
    return $special_price;
    } else {
    return false;
    }
    } else {
    // get sale price
    ZC 1.5.5
    Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3

  4. #1044
    Join Date
    Jun 2009
    Location
    Orange County, California
    Posts
    544
    Plugin Contributions
    18

    Default Re: DUAL Pricing v2

    Try reversing all the content inside the brackets {}. So essentially, use the same code outlined from Edington's fix, but switch the $special_price = false; with all the code that comes after } else {. You'll get something like this:

    Code:
    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
    // All the display code would go here
    } else {
    $special_price = false;
    }
    You might have to do further customizations to prevent sale prices from going into the shopping cart for Retail customers. You mention that Retail prices are displayed a service only - does that mean you do not plan to sell anything Retail, you're only selling Wholesale?

    If that's the case, why not hide pricing unless users are logged in. There's a switch in Configuration > Customer Details > Customer Approval Status.

    Then, there's a line of code in tpl_product_info_display.php that you can uncomment to show Wholesalers the retail price on the same page, like so:

    Retail price: $500
    Wholesale price: $300

    Here's that section of code:

    Code:
    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
     	// Uncomment the following line if you want wholesalers to be able to see Retail prices while logged in
    	echo '<span id="retailwhole">Retail Price: ' .$one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == '1') ? TEXT_BASE_PRICE : '') . zen_get_products_display_retail_net_price((int)$_GET['products_id']).'</span><br /> ';
    }

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

    Default Re: DUAL Pricing v2

    Ok if I'm going to publish the working wholesale module we have to be clear that it seems now there are 3 half working versions in existence for 1.39h.

    What does work in my version:
    - retail pricing and display
    - wholesale pricing and display
    - retail attribute pricing with sold out by attribute
    - wholesale attribute pricing with sold out by attribute and grid pricing
    - wholesale login that works regardless of the template/multisite being used - uses one database
    - bug fixes for the subtotal display problems listed in this forum

    What has not been tested:
    - zen discount pricing
    - zen group pricing

    I'm interested to know if anyone wants me to test these modules prior to releasing my version or if there's a wish list of features I could add in before it goes live.

    Twitch.

  6. #1046
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default Re: DUAL Pricing v2

    Quote Originally Posted by twitchtoo View Post
    Ok if I'm going to publish the working wholesale module we have to be clear that it seems now there are 3 half working versions in existence for 1.39h.

    What does work in my version:
    - retail pricing and display
    - wholesale pricing and display
    - retail attribute pricing with sold out by attribute
    - wholesale attribute pricing with sold out by attribute and grid pricing
    - wholesale login that works regardless of the template/multisite being used - uses one database
    - bug fixes for the subtotal display problems listed in this forum

    What has not been tested:
    - zen discount pricing
    - zen group pricing

    I'm interested to know if anyone wants me to test these modules prior to releasing my version or if there's a wish list of features I could add in before it goes live.

    Twitch.
    You might as well. If you don't I'm sure someone will be wanting them features a well.
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

  7. #1047
    Join Date
    Jun 2012
    Posts
    7
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    I really need help here! I have NO CLUE as to how to set up the shipping by weight for my 6000 items. (sigh)
    I can't understand the system and am just losing it!
    HELP please

  8. #1048
    Join Date
    Jun 2012
    Posts
    13
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    Quote Originally Posted by twitchtoo View Post
    Ok if I'm going to publish the working wholesale module we have to be clear that it seems now there are 3 half working versions in existence for 1.39h.

    What does work in my version:
    - retail pricing and display
    - wholesale pricing and display
    - retail attribute pricing with sold out by attribute
    - wholesale attribute pricing with sold out by attribute and grid pricing
    - wholesale login that works regardless of the template/multisite being used - uses one database
    - bug fixes for the subtotal display problems listed in this forum

    What has not been tested:
    - zen discount pricing
    - zen group pricing

    I'm interested to know if anyone wants me to test these modules prior to releasing my version or if there's a wish list of features I could add in before it goes live.

    Twitch.
    I am very appreciative of all the contributions to this mod so far by everyone on this thread, not least to DivaVocals for keeping track of all the fixes required along the way, and to Dannati for implementing those fixes and making available his files, which I am currently using.

    For my tuppence worth to your question Twitch, I would be keen to see how your version is now, and leave 'wish list' features alone. This way you could benefit from peer testing of what needs testing, we could benefit from the option to use your version of the module if we wish, and extra features can come later if you or anyone else feels so inclined to contribute to it further. Just my thoughts, but great work and thanks everyone who contributes

  9. #1049
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: DUAL Pricing v2

    Quote Originally Posted by twitchtoo View Post
    Ok if I'm going to publish the working wholesale module we have to be clear that it seems now there are 3 half working versions in existence for 1.39h.

    What does work in my version:
    - retail pricing and display
    - wholesale pricing and display
    - retail attribute pricing with sold out by attribute
    - wholesale attribute pricing with sold out by attribute and grid pricing
    - wholesale login that works regardless of the template/multisite being used - uses one database
    - bug fixes for the subtotal display problems listed in this forum

    What has not been tested:
    - zen discount pricing
    - zen group pricing

    I'm interested to know if anyone wants me to test these modules prior to releasing my version or if there's a wish list of features I could add in before it goes live.

    Twitch.
    Release it and let the chips fall where they may..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #1050
    Join Date
    Jul 2011
    Posts
    138
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    Quote Originally Posted by jackie.taferner View Post
    Try reversing all the content inside the brackets {}. So essentially, use the same code outlined from Edington's fix, but switch the $special_price = false; with all the code that comes after } else {. You'll get something like this:

    Code:
    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
    // All the display code would go here
    } else {
    $special_price = false;
    }
    You might have to do further customizations to prevent sale prices from going into the shopping cart for Retail customers. You mention that Retail prices are displayed a service only - does that mean you do not plan to sell anything Retail, you're only selling Wholesale?

    If that's the case, why not hide pricing unless users are logged in. There's a switch in Configuration > Customer Details > Customer Approval Status.

    Then, there's a line of code in tpl_product_info_display.php that you can uncomment to show Wholesalers the retail price on the same page, like so:

    Retail price: $500
    Wholesale price: $300

    Here's that section of code:

    Code:
    if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
     	// Uncomment the following line if you want wholesalers to be able to see Retail prices while logged in
    	echo '<span id="retailwhole">Retail Price: ' .$one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == '1') ? TEXT_BASE_PRICE : '') . zen_get_products_display_retail_net_price((int)$_GET['products_id']).'</span><br /> ';
    }
    Thanks Jackie. That worked and I also appreciate the other comments. The only thing I notice (fyi to others who may use this) is: once logged in as wholesale it shows the sales price for both retail & wholesale istead of just for wholesale on the product info page. It's not that big of a deal but if I can hack through the fix I'll post it. The big thing is that it no longer shows the sales price if NOT logged in

    To answer your other question. We do not sell retail. However a lot of users are either 1)too lazy to sign in to see what MSRP is or 2) they enjoy the ability to turn the monitor around and show a customer the products & prices so that the end user feels comfortable about the manufacturer setting a MSRP and not a dealer using some inflated #. As for showing retail & dealer pricing, that happens on the product info page but not the product listing page. I believe this may be because of the column/grid add on.
    ZC 1.5.5
    Add ons: - Column/Grid 1.3.8 - Dual pricing 1.7 - ImageHandler3

 

 

Similar Threads

  1. Dual Pricing - Wholesale Pricing - Some issues I was able to fix
    By hollettster in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 17 Dec 2010, 12:00 AM
  2. Dual Pricing - Wholesale Pricing for Zen 1.3.7 works with Easypopulate
    By micheloo in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 20 Jan 2010, 06:01 PM
  3. No Attributes after installing Dual Pricing - Wholsale Pricing
    By drybsmt in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 10 Sep 2009, 11:09 AM
  4. Quantity Discounts and Dual Pricing - Wholesale Pricing
    By snarkys in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 2 Jul 2007, 06:47 PM
  5. Dual Pricing Module & Dual Tax Classes
    By WILL in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 25 May 2007, 10:44 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