Thread: DUAL Pricing v2

Page 1 of 2 12 LastLast
Results 1 to 10 of 1503

Hybrid View

  1. #1
    Join Date
    May 2006
    Location
    Louisiana
    Posts
    263
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Can anyone tell me if there's a way to just display one retail price to retail customers and website vistors.

  2. #2
    Join Date
    Oct 2008
    Location
    Midwest USA
    Posts
    71
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Hi Weezee,

    I am new to Zen Cart and not an expert but I checked your code and wherever you are calling the code to show pricing you need an if statement to determine if a wholesale customer is logged in.

    Sorry I can't tell you where that is off the top of my head, but the resultant code looks like this in HTML:

    Code:
    <h2 id="productPrices" class="productGeneral">
    <span id="retailwhole"> Retail Price: $49.95</span>
    <br/>
    <span id="retail">Retail Price: $49.95</span>
    </h2>
    As you can see it is showing the price twice, From your previous posts it looks like this file may be your key, and it looks like the IF statement already exists, did you modify the logic some how? The IF statement seems to be missing:

    Code:
    //***********************************************************************
    //***DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
    //***********************************************************************
    
    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 /> ';
    
    //********************************************************************
    What did you change in this file?

    Gary777

  3. #3
    Join Date
    May 2006
    Location
    Louisiana
    Posts
    263
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    This is the part I changed. (taken from tpl_product_info_display.php, line 67-75) The post is located here:

    http://www.zen-cart.com/forum/showth...ICE#post574582


    //***********************************************************************
    //***DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
    //***********************************************************************
    if ($_SESSION['customer_id']) {
    $customers_id = $_SESSION['customer_id'];
    $customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
    if ($customer_check->fields['customers_whole'] != "0") {
    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 /> ';
    }
    }
    //***********************************************************************
    //***END DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
    //***********************************************************************

  4. #4
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    116
    Plugin Contributions
    1

    Default Re: DUAL Pricing version 2

    Quote Originally Posted by weezee View Post
    Can anyone tell me if there's a way to just display one retail price to retail customers and website vistors.

    This is the way the module works. You shouldn't need to change anything. The post you linked to was for somebody who wanted to show both prices to all visitors regardless of their status. The module without modifications will show:

    (Retail and non logged in) will view:

    Retail: XXX

    (Logged in WS customers) will view:

    Retail XXX
    Whole Sale: YYY

    I'm sorry if I don't understand the question properly and failed to explain what you were asking. Please just ask again if this is the case

  5. #5
    Join Date
    Oct 2008
    Location
    Midwest USA
    Posts
    71
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Hi Madfastride and weezee,

    This explains what weezee did, he/she changed the actual text of the line to read "Retail" where it should have read "Whole Sale:"

    Code:
    echo '<span id="retailwhole">' . ' Retail Price:
    This is part of what confused me too... The module should have worked as is...

    Nice module by the way!

    Gary777

  6. #6
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    116
    Plugin Contributions
    1

    Default Re: DUAL Pricing version 2

    Quote Originally Posted by Gary777 View Post
    Hi Madfastride and weezee,

    Code:
    echo '<span id="retailwhole">' . ' Retail Price:
    This is part of what confused me too... The module should have worked as is...
    Okay I understand that... What I was trying to get across with the naming of the id was that it was going to be the Retail price displayed to a whole sale customer... I tried to keep it separate in case one wants to display and style the retail price for retail customer different that retail price for whole sale customer. Say...

    (Retail customer)
    Your Price: XXXX (id="retail")

    (Whole Sale customer)

    MSRP: XXX (id="retailwhole")
    Whole Sale Price: YYY (id="whole")

    Sorry for any confusion. I tried to explain it in the read me.

    Quote Originally Posted by Gary777 View Post
    Nice module by the way!
    I just picked up on this where some others who had done some hard work left off. But thanks for the little bit I did.
    Last edited by madfastride; 9 Oct 2008 at 05:33 AM.

  7. #7
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    116
    Plugin Contributions
    1

    Default Re: DUAL Pricing version 2

    Quote Originally Posted by ryanb4614 View Post
    Well I haven't added that file, and what happens is.... the price will change but it just won't say retail and whole sale. the price just shows at the wholesale price.... checkout and everything works so i assume it is safe to leave it at that.
    True Ryan, sorry I should have been more specific. The tpl_product_display.php file will not change any functionality in the Dual Pricing module. It will not display the way it was intended without the change. The module is supposed to display a retail price to retail customers and a retail and whole sale price to whole sale customers. But if you are happy with the functionality by all means keep the module as it is. Cheers,

  8. #8
    Join Date
    Oct 2008
    Location
    Midwest USA
    Posts
    71
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Hi Madfastride,

    I must not have been very clear in my post, I understood exactly why you did what you did, it was weezee's post and the double "retail price" listing in her code that threw me off, it should have worked.

    I hadn't taken a good look at the code at that point (as I mentioned) but was working on a similar task (that's how I found weezee's post) and saw that she hadn't received a response so tried to help as best I could. Your reply cleared everything up for me and hopefully weezee too.

    Thanks again,

    Gary777

  9. #9
    Join Date
    Aug 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Hi Everyone,

    This mod is just what we're looking for and is working like a dream.

    Could anyone tell me or help point me in the right direction so it will show the percentage diffrence in the two displayed prices?

    So it would display like:

    Retail Price: £xx.xx
    Wholesale Price: £xx.xx
    You Save: xx%

    Many many thanks in advance.

  10. #10
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    116
    Plugin Contributions
    1

    Default Re: DUAL Pricing version 2

    Quote Originally Posted by setter View Post
    Retail Price: £xx.xx
    Wholesale Price: £xx.xx
    You Save: xx%
    Setter,
    I'm glad you like the module. I'd like to add this to a release I'm working on. Along with a few other features, and customizations. But it keeps getting pushed back. You could rename a few variables and do the calculations in the tpl_display_product.php file. If you don't want to mess with it or nobody else has the code <wink>a little donation is going a long way with progressing this release and getting an early copy of the feature you donated for. </wink> PM me if you'd like.

 

 
Page 1 of 2 12 LastLast

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

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