Re: DUAL Pricing version 2
Also retail customer see two retail prices displayed when they are signed in.
I would like for the retail customer to only see the retail price displayed, and any one just visiting my site to see the retail price. The wholesale customer sees the wholesale and retail price I don't want to change that.
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.
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
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
//***********************************************************************
Re: DUAL Pricing version 2
Quote:
Originally Posted by
weezee
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
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
Re: DUAL Pricing version 2
Thanks,
The post for someone else. I had a misunderstanding of the post, I thought it was to display both wholesale and retail for the wholesale user, but when I changed the file I had two retail prices displaying, but the wholesale was ok, it was displaying the retail and wholesale price when the user was login.
Re: DUAL Pricing version 2
[QUOTE=madfastride;622382]Ryan, The template needs to be installed in order to show the prices. But you are combining two custom files. Use something like WinMerge to get this done. Also you can look at the Dual Pricing file and see that it's clearly noted where the file is modified and what needs to carry over to your site.
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.
Re: DUAL Pricing version 2
Quote:
Originally Posted by
Gary777
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
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.
Re: DUAL Pricing version 2
Quote:
Originally Posted by
ryanb4614
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,