Seems that this is still the case. Can anyone help me here? Either with a fix, or some clue about where this is being generated? I'd really like to fix this glitch, because a wrong price on an invoice does not look good.
Printable View
hairydog, I can't seem to replicate this issue on my end. The invoice shows the correct product price and order total. Can you try re-uploading all the files included with the Dual Pricing installation? If it still does not work as expected, are you using the latest version?
I uploaded all the files for the latest version (for 1.3.9h) as part of checking. The item prices are fine: it is the attribute prices that are displaying as the wrong amounts. It correctly charges the trade prices for the attributes, and the invoice line total is correct, but the attributes are listed with the retail price on the invoice.
In this example, the product is priced by attributes and the trade prices are £22.95, £100.00 and £34.95 - a total of £157.90, which is that the line total correctly shows.
The problem is that it is showing the retail prices for the attributes as part of the line description.
GU Tilt & Slide Patio Bogie Wheels 38514
- Accessory Pack: White (+£24.95)
- Bogie Wheels (Pair): Left Hand (+£105.00)
- Centre Cover: White (+£36.95)GUBOGIE 20.00% £157.90 £157.90
Ok, I've made a note of the issue and will work on a fix for the new v2.2 release. I can't guarantee a release date, as we try to support the community in our free time.
On a side note, I do suggest that you upgrade to the latest version of ZenCart (1.5) as it has been out for more than a year. Using an old version leaves you vulnerable to hackers/ID thefts. In fact, the PCI Compliance board requires that you upgrade within 3 months of any new cart release.
I would recommend upgrading your add-ons using the new 1.5 files and/or hiring a developer to do this for you. The enforced password changes are a PCI requirement - precisely the sort of thing business owners are supposed to do, but are never bothered with because of the inconvenience of remembering a new password.
Owning an online store is much easier than a physical storefront, but it comes with great responsibility to keep your customer's information safe. Running older cart software is not safe for your customers or for your business, regardless of the effort required to upgrade it.
Thank you for the unwanted lecture, and FYI monthly password changes reduce security because they need to be written down. I don't own an online store and have no interest in doing so, but I do understand the economics of them, as you clearly do not. Without a business case, an upgrade to 1.5 is a hard sell. And there is no business case right now.
What I do want is a fix to a bug that has been around for years.
Business case = preventing ID theft and lawsuits
The bugfix will be applied to the latest Dual Pricing version, which is 1.5 compatible.
Clearly this thread is degenerating, so I will politely back away and will not respond further. I was just trying to be helpful and provide some advice on the matter. I am sorry you did not find it useful.
Update on current problems & issues please?
I have read through alot of posts trying to figure out exactly where this module is with attribute functionality.
I see in the changelog that the following was supposedly fixed?
"v2.1- Fix attribute pricing during checkout"
"v2.0- fix attribute pricing when adding to cart"
However I have installed a base 1.5.1 of Zen cart and have issues with attributes pricing defaulting to level one price when added to cart. This only happens when a customer is set to level 2,3 or 4 pricing. The drop down menu on he product page however displays proper wholesale pricing for attribute. Is this fixed and what other issues can we expect at this point.
Thanks for anyone that has input on this!
I think you can assume that it is not fixed (and may never be). Three or four years after being reported this bug remains outstanding, so I assume it is too fundamental to sort out. The basic trouble for me is that the code is a complex mesh of interconnected parts (made worse because I have some other added bits in the pricing)
Attributes are a bit of a mess anyway, because we really need proper stock/availability checking of various combinations and that is hard to describe, let alone code! Conor was working on this towards the end of his life, but I hadn't managed to persuade him to do wholesale pricing in there as well.
I'm not sure if this is the place to post this question or not, but I'm doing it anyways cuz I've been searching for hours and I'm going crazy trying different things!...and of course, I'm failing! :'(
I'm trying to add a wholesale price level for my website via Easy Populate. I am using dual pricing 2.1 and i've trie easy populate 4 and 5...nothing seems to work...
any help here? What field do I set in Easy Populate?
P.s. sorry if I didn't post this in the right forum...
hi all, I've come across a little problem entering the wholesale prices on the product page. This worked originally but now If i try to update these prices it doesn't save the information. I can enter the information from the database itself and it shows up on the edit product page, just not the other way around. Can anyone suggest which file I need to look at that controls this, I must have changed it at some point but I'm not sure which one it is. I thought that it might be the collect info php but this matches the original.
Thanks
Kezan98,
I don't know if you fixed this or not. But just in case. It's the update_product.php file you're looking for. If memory serves me right, it's located at.
/YOUR_ADMIN/includes/modules/update_product.php
'
This is where your stored $_POST value gets transferred to the DB and is likely where your site is broken.
Hello all,
I was wondering if anyone could help me with what I am trying to setup. I have this mod installed on a test site on 1.5.1. I was wondering if there is anyway I can setup a product where only wholesale customers have access to quantity discounts. I have been reading through the forums and tried setting it up myself but it only looks like I can setup quantity discounts for both retail/wholesale customers, not just wholesale customers. Can anyone else confirm my findings on this, I would hate to have to try to code this myself if the functionality is already there and since zencart coding structure (to me) seems very complicated.
P.S. I am not using any price by attributes...
Thanks for any help.
Hi, how can I get the dropdown prices to display the wholesale price when a wholsale customer is logged in? At the moment id displays the retail price but charges the correct wholsale price when added to cart. Running on zen 1.3.8
Wanted to also say I am running version 1.8 of the dual pricing module with dynamic price updater. It displays the retail price at first but then updates to the wholesale price when an attribute is selected. Have lost the ability to display both retail and wholesale since putting in the dynamic price updater. That's ok if I can get it to display the main price as a wholesale price when the product is loaded and for it to display the wholesale attribute prices when the wholesale customer is logged in.
Wow this thread is a bit big, Ive tried looking and cant see the answer, maybe it is here.
This module works fine for me, apart from one thing. It doesn't show the reduced in the cart until the end at check out. So my wholesale people can't see the actual price they pay, they just see the original non wholesale price
Hello,
Need a little help. I currently have Dual pricing and hidden wholesale in use on my site. I am now wanting a second level of wholesale and was wondering how I do it.
When I do wholesale for the 1 level that I currently have, I just put the price into the wholesale pricing box on the product page. As there are no other boxes than that. How do I do it for a second level of wholesale that only a level 2 will see? I only want level 1 to see normal pricing and level 1 which I currently have and I only want level 2 to see normal and level 2 pricing (not level 1).
What can I do?
Thank you
Amy
Hi,
Continuing from the last post...
Or is there a way that I can have a separate area just for the level 2 wholesale people that they can log into to just see the level 2?
Thank you
Amy
How do I uninstall this plugin? I used the script, but when I did, it caused some problems.
Hello,
I am using zen cart 1.39H and also have installed the 'dual pricing' module. It works great, wholesale customers get 10%.
The issue though is that the client offers 10% off and free shipping if someone orders 12 bottles.
Well they dont' want the wholesale customers to receive free shipping if they are a wholesale customer. The additional 10% discount is fine though. Iave looked and can't find a similar issue posted on the forum.
Any help to get this figured out would be appreciated
thanks
Hello to all,
I installed Dual Pricing - Wholesale Pricing veriosne 2.1.
In the description of the module is specified in the "Tax no longer applied to wholesale customers (level 1 and up)"
In my site does not.
The prices are wholesaler viaulizzato with taxes.
How can I fix the problem?
BUG REPORT: V2.1
The file /YOUR_ADMIN/includes/modules/product/preview_info.php has an error in line#21
It refers to a none existant field "p.product_price_w" it should be "p.products_price_w". (missing the 's' from 'product').
This is causing a fatal PHP error when clicking on the LHS icon in the products editing area. When this icon is clicked it produces an almost blank screen with the following warning:
WARNING: An Error occurred, please refresh the page and try again.
Cheers
Rod
Using Dual Pricing v1.2 on a Zen Cart v1.5.1 store. When viewing (in admin) a category that has a SaleMaker sale applied to the entire category and no wholesale price assigned, the price for each product in that category displays the sale price as $0.00:
The price does display properly on the storefront. I'll post back once I've got a solution ...Code:$70.00
Sale: $0.00 / 0
I'm thinking that this was caused by an over-zealous change to /admin/includes/functions/functions_prices.php. Simply commenting out the change to the zen_get_products_special_price function appears to correct the display problem:
Code://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;
}
/*-bof-20131201-lat9-Removed so that sale price can be shown in admin
//Dual Pricing start
if ($product->RecordCount() > 0) {
// $product_price = $product->fields['products_price'];
$product_price = zen_get_products_base_price_w($product_id);
} else {
return false;
}
//Dual Pricing end
-eof-20131201-lat9 */
I'm working on a store that wants to provide the full 4-levels of wholesale pricing, but chooses not to enable wholesale prices for some levels for some products. For example, I've got a test customer that is at pricing level 2 and I've entered 80.00-0.00-70.00-60.00 for the wholesale price for one of the products.
My expectation was that when the wholesale customer logged in that they would not be shown a wholesale price for that product. Instead, they received the $80.00 wholesale price. Is that a bug or working-as-designed?
@lat9, please read post #1210 & #1211 ...
The changes that I made to correct this behavior were threefold (all in /includes/functions/functions_prices.php).
andCode:////
// computes products_price + option groups lowest attributes price of each group when on
//Dual Pricing
function zen_get_products_base_price($products_id) {
global $db;
$product_check = $db->Execute("select products_price, products_price_w, products_priced_by_attribute from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
// is there a products_price to add to attributes
//Dual Pricing start
if (isset($_SESSION['customer_whole']) && $_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
$i--;
$products_price_array = $product_check->fields['products_price_w'];
$productsprice = explode("-",$products_price_array);
$products_price = (float)$productsprice[$i];
/*-bof-20131201-lat9-removed to allow products to be wholesale for some, but not all, wholesale groups
if ($products_price == '0' || $products_price == '') {
$products_price = (float)$productsprice[0];
}
-eof-20131201-lat9 */
if ($products_price=='0'){
$products_price = $product_check->fields['products_price'];
}
} else {
$products_price = $product_check->fields['products_price'];
}
// do not select display only attributes and attributes_price_base_included is true
$product_att_query = $db->Execute("select options_id, price_prefix, options_values_price, options_values_price_w, attributes_display_only, attributes_price_base_included, round(concat(price_prefix, options_values_price), 5) as value from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "' and attributes_display_only != '1' and attributes_price_base_included='1'". " order by options_id, value");
//Dual Pricing end
$the_options_id= 'x';
$the_base_price= 0;
// add attributes price to price
if ($product_check->fields['products_priced_by_attribute'] == '1' and $product_att_query->RecordCount() >= 1) {
while (!$product_att_query->EOF) {
if ( $the_options_id != $product_att_query->fields['options_id']) {
$the_options_id = $product_att_query->fields['options_id'];
//Dual Pricing start
if (isset($_SESSION['customer_whole']) && $_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
$i--;
$option_price_array = $product_att_query->fields['options_values_price_w'];
$optionprice = explode(",",$option_price_array);
$options_values_price = (float)$optionprice[$i];
/*-bof-20131201-lat9-Removed so that attributes can be wholesale-priced for some, but not all, wholesale groups
if ($options_values_price=='0' || $options_values_price==''){
$options_values_price = (float)$optionprice[0];
}
-eof-20131201-lat9 */
$the_base_price += $options_values_price;
if ($options_values_price=='0'){
$the_base_price += (($product_att_query->fields['price_prefix'] == '-') ? -1 : 1) * $product_att_query->fields['options_values_price'];
}
} else {
$the_base_price += (($product_att_query->fields['price_prefix'] == '-') ? -1 : 1) * $product_att_query->fields['options_values_price'];
}
}
//Dual Pricing end
$product_att_query->MoveNext();
}
$the_base_price = $products_price + $the_base_price;
} else {
$the_base_price = $products_price;
}
return $the_base_price;
}
Code:////
// attributes final price
function zen_get_attributes_price_final($attribute, $qty = 1, $pre_selected, $include_onetime = 'false') {
global $db;
global $cart;
$attributes_price_final = 0;
if ($pre_selected == '' or $attribute != $pre_selected->fields["products_attributes_id"]) {
$pre_selected = $db->Execute("select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_attributes_id= '" . (int)$attribute . "'");
} else {
// use existing select
}
//Dual Pricing start
if (isset($_SESSION['customer_whole']) && $_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
$i--;
$option_price_array = $pre_selected->fields['options_values_price_w'];
$optionprice = explode(",",$option_price_array);
$options_values_price = (float)$optionprice[$i];
/*-bof-20131201-lat9-Allow attributes to be wholesale-priced for some, but not all, wholesale groups
if ($options_values_price=='0' || $options_values_price==''){
$options_values_price = (float)$optionprice[0];
}
-eof-20131201-lat9 */
$the_base_price += $options_values_price;
if ($options_values_price=='0'){
$options_values_price = $pre_selected->fields['options_values_price'];
}
} else {
$options_values_price = $pre_selected->fields['options_values_price'];
}
//Dual Pricing end
if ($pre_selected->fields["price_prefix"] == '-') {
//Dual Pricing
$attributes_price_final -= $options_values_price;
} else {
//Dual Pricing
$attributes_price_final += $options_values_price;
}
// qty discounts
$attributes_price_final += zen_get_attributes_qty_prices_onetime($pre_selected->fields["attributes_qty_prices"], $qty);
// price factor
$display_normal_price = zen_get_products_actual_price($pre_selected->fields["products_id"]);
$display_special_price = zen_get_products_special_price($pre_selected->fields["products_id"]);
$attributes_price_final += zen_get_attributes_price_factor($display_normal_price, $display_special_price, $pre_selected->fields["attributes_price_factor"], $pre_selected->fields["attributes_price_factor_offset"]);
// per word and letter charges
if (zen_get_attributes_type($attribute) == PRODUCTS_OPTIONS_TYPE_TEXT) {
// calc per word or per letter
}
// onetime charges
if ($include_onetime == 'true') {
$pre_selected_onetime = $pre_selected;
$attributes_price_final += zen_get_attributes_price_final_onetime($pre_selected->fields["products_attributes_id"], 1, $pre_selected_onetime);
}
return $attributes_price_final;
}
Would you be so kind and post the entire /includes/functions/functions_prices.php file for me ...
haredo, here's a zipped version; the file's too big to fit in a code wrapper!
Attachment 13449
Ty for the zip file ...
I have installed dual pricing 2.1 on a fresh install zencart v1.5.1 on a wamp server ...
Only this Plugin is installed ..
The module works perfect without adding attributes ..
But when adding a product priced by attribute, the module reverts back to the first wholesale level and not level 1, 2, or 3 will show ...
By changing the functions_prices.php, The prices beside the attributes are deleted ...
Grrrrrrr ....
Sorry, I haven't validated the attribute-related paths ... the base price path has been checked out and deployed.
Thats fine, well if you ever get a spare moment in your busy, hectic day ...
Twitch Wholesale with Attributes works properly with attributes for wholesale/retail http://www.zen-cart.com/downloads.php?do=file&id=1771
Screenshots are included so you can see how it integrates.
Twitchtoo,
Ty for the update, I noticed 5 days ago your thread on this module ...
Already loaded and works like a charm ...
Any chance you will make a total of 3 to 4 filter levels like the Dual Pricing?
The Twitch Wholesale filter isn't bound to 0 or 1. So really it's already built to use multiple levels :)
However, practically I'd rather integrate it with the Group Pricing Module because it has it's own benefits.
Twitchtoo,
admin panel/ customers/customer/ wholesale customer
1. Retail Customers = 0 (Default) | Wholesale Customers = 1 (Twitch Wholesale Switch).
2. attribute controller editing a product with attributes
3. 5.00
4. Here i only get one level on the Wholesale Side ..
Dual Pricing
admin panel/ customers/ customer/ wholesale customer
1. 0= Default Level 1, 2, 3 4
2. Attribute controller editing a product with attributes
3. 5.00, 4.00, 3.00, 2.00
4. If I set a customer to level 3 I will see $3.00 for the attribute when logged in ...
Haredo, You are correct. I have no plans to incorporate the code Dual Pricing uses to add dash separated data into one field.
Although it works, I have managed a site for over 6 years that's had a lot of complications as a result of the necessity of extracting the data from that array.
That's one of the reasons I developed Twitch Wholesale.
The same results can be achieved without the Dual Pricing array loop with Twitch Wholesale...
- Adding additional numbers to the filter essentially produces separate 'groups'.
- Using additional numbers in the code in a variety of places will also create 'groups'.
- Adding 1 or 10 more 'wholesale price' field(s) on the product page then simply pointing the code at the new field based on the wholesale_customer value is straight forward and would easily ensure success with additional wholesale attributes prices.
- Exporting the database would only require a field name not an array extraction loop.
As well, I am about to release a wholesale pricing integration package for each of the default ZenCart pricing modules. So far SaleMaker, Specials, Discount Coupons, Group Pricing and Taxes are all working with little or no changes.
Testing starts tonight with wholesale attributes...
Perhaps at this point it makes sense to move "Twitch Wholesale" discussions over to the "Twitch Wholesale" support thread rather than hijack this one..
Perhaps the topics above are VERY relevant to this "Thread" ...
I can't find this anywhere, but Is it possible to set a minimum purchase for wholesale customers? And to disable coupons for wholesale?
I have re-read this forum and thought DP1.9 was the solution in 1.3.9h for the wrong price populating in the shopping cart. After downloading it and doing a winmerge...the only difference I saw was that DP1.8 used "customers_wholesale" versus 1.9's usage of "customer_whole".
My problem still exist:
When shopping as a retail customer, I see the correct pricing for quantity discounts. I also see the correct pricing for the quantity discounts when logged in as wholesale.
When I'm logged in as a wholesale account however, once I add a product to my shopping cart, the first tier (1-4 piece) pricing shows up correctly in the shopping cart. If I add enough quantity to take advantage of the 2nd tier (5+ pieces) the price in the shopping cart is populated as the 2nd tier MSRP price and not the 2nd tier wholesale price.
Does anyone know the fix for this?
Thanks
Just came looking for a solution to this same problem. Seems to be a bug in the plugin. If I can work out a solution, I'll post back here.
Last time I checked I believe the Dual Pricing loop is not running/included in the Discount loop. You'll need to add it.
I understand what you are saying, don't have a clue at this point and would appreciate more assistance in adding it to the loop if you wouldn't mind.
Am I looking in the correct places to copy code from:
\includes\functions\functions_prices.php
into:
/includes/classes/shopping_cart.php
Thanks and have a good weekend.
Ok, I've fixed the bug with this not honoring the quantity discount price for wholesale customers. All the edits are in:
\includes\functions\functions_prices.php
the corrected version is attached.
Attachment 14416
Unzip and replace the file of the same name in this plugin. The new code replaces lines 1502 - 1589.
If anyone is interested in testing the Dual Pricing plugin for Zen Cart 1.5.3, I have a version ready for *testing*. It is not ready for a live site yet. PM me if interested.
Hello,
Can someone please help me or point to the correct post where i can find the solution here?
I'm trying to add wholesale pricing to my Easy Populate spreadsheet.
I added the below line to the admin\includes\languages\english.php file as instructed but no luck :(>>>
define('EASYPOPULATE_CONFIG_CUSTOM_FIELDS', 'products_price_w'); //Easy Populate
Attachment 14429
no help here? :'(
I am currently running the following:
Zen Cart 1.5.1
Template: Glasgow_neat
Add-ons: USPS_2014_0306_K3
Stamps ShoppingCart Integration Kit
All of my products are priced by attributes only, and do not have a flat price associated to them. When pricing by attributes, I have the following feilds filled in:
Prices and Weights
Price: + 20.00
Weight: 0.16875
Order: 3
One Time: 0.0000
Price Factor: Offset: 0.0000 and 0.0000
One Time Factor: Offset: 0.0000 and 0.0000
When I had Dual Pricing V2.1.1 installed (Removed due to the problem here), in the added TRADE field I had 15.00,12.00,11.00,10.00
All prices showed up correctly for Retail and Wholesale customers....when they added the product to the cart, the cart showed the price as $0.00.
So I figured it was not doing any attribute adding in the cart section. I added a flat price under the Product entry, and the price showed up in the cart (Minus any attribute pricing)
Any idea where I should start looking?
Thanks,
Scott
Ok, just noticed that there are 2 sets of drop down Attributes for the product....If I use the top set item in cart reads $0.00 for both Retail and Wholesale....If I fill in the bottom set and then "Add this to my cart" I get the proper price. What file controls how or where these options are shown (Looks like it may be duplicated somewhere).
Otherwise, it looks like the module is working fine!
Attachment 14445
The top 2 drop downs are the original, the bottom 2 show up with Dual Pricing installed....When installed only the bottom 2 drop downs operate as they should.
The attributes do not normally display twice on the product page. I'd suggest checking the tpl_product_info_display.php file and either removing the duplicate (best option) or fixing the errors in the second location.
Thanks jeking for pointing me to the correct file, I found the error and all is well now!I know It has probably been asked, but how to disable free shipping for Wholesale accounts?
Thanks again!
Scott
Glad it worked.
I'm not aware of a way to disable Free Shipping. I'm sure it can be done, but hasn't yet.
Looking at the freeoptions.php, I was thinking if we 'if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' )' to check the customer and if wholesale then return a false (Same way that it checks to see if the total is > say $50.00). I am in no way a PHP coder, know just enough to be dangerous! But maybe someone on here could figure it out...
Thanks again!
Try this in a test environment first, but it should do the trick.
Attachment 14460
HI. I am running dual pricing v2.1 on zen cart v1.5.1. I know it's for v1.50 but I do have this running on another site successfully. You can see my store here: http://www.coolsteratvparts.com/bran...atv-parts-c-1/
I have a problem in that I have this module installed and it mostly works just fine. I have a small display issue. That is when I log in (during testing) and look at the products, they all still show the retail price (not the dealer price). Yet once I add the item to the cart, the special dealer price shows.
Anyone know why the dealer price will not show on the product or product info page, but will show once added to the cart? I would like the special dealer pricing to show BEFORE adding to the cart (and maybe even the original pricing as well).
Sounds like you may have missed a template override. Check that tpl_product_info_display.php in your template folder has the edits from this plugin.
That is what I was thinking. But I overwrote that file with the file you provided multiple times. Also, I have just upgraded to the newer v2.1.1 which is for my zen cart version. I am still seeing the same problem even after overwriting that template file again. Perhaps my SEO Urls or cache is stopping me from seeing these updated prices now that I am logged in.
I will look into the file you mentioned, to see if the settings from your file are the same and are listed in there.
Thank you Jim. I modifed the file you suggested it was missing the proper variables. Now its showing just fine.
Hi
Has anyone tested this with 1.5.3 with a responsive template? I've looked at a couple of add-ons but the code changes to core template files are too much?
A responsive template should not make any difference. But this plugin has not been update for 1.5.3 yet. I have a beta version if you'd be interested in testing it. It should not be used on a live site.
Hi Jim
We do only have the live site at the moment. If you want to let me have a copy of the BETA version to compare the files against the ones I currently use with 1.5.3 & Responsive Sheffield Blue, I'll happily WinMerge Check them. Once I'm confident everything is checked I'd happily do a backup of current site and upload the BETA version to see how it works with the current site - is no problem restoring a backup if things go wrong.
Mark
Hi Jim
The Beta version seems to be working well on our 1.5.3 Responsive site. We're using it slightly differently, we have MG Dealers that purchase from us at a trade price and MG Car Club members who get a discounted price. Feedback from the users who's accounts we've updated to the relevant 'wholesale' price is very positive.
The only issue we still have is the RRP£ still showing on all logins - Discounted price only shows in shopping cart once an item is added to cart?
I've checked tpl_product_info_display and all 'seems' well?
Code:<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=product_info.<br />
* Displays details of a typical product
*
* @package templateSystem
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_product_info_display.php 19690 2011-10-04 16:41:45Z drbyte $
*/
//require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
?>
<script type="text/javascript">
$(document).ready(function() {
jQuery(".content1").hide();
//toggle the componenet with class msg_body
jQuery(".heading").click(function()
{
jQuery(this).next(".content1").slideToggle(500);
jQuery(this).toggleClass("minus");
});
});
</script>
<div class="centerColumn" id="productGeneral">
<!--bof Form start-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product', $request_type), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
<!--eof Form start-->
<?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>
<!--bof Category Icon -->
<?php if ($module_show_categories != 0) {?>
<?php
/**
* display the category icons
*/
require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
<?php } ?>
<!--eof Category Icon -->
<!--bof Prev/Next top position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
* display the product previous/next helper
*/
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next top position-->
<!--bof Main Product Image -->
<?php
if (zen_not_null($products_image)) {
?>
<?php
/**
* display the main product image
*/
require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
}
?>
<!--eof Main Product Image-->
<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->
<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
//***********************************************************************
//***DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************
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 /> ';
}
//***********************************************************************
//***END DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************
if ($show_onetime_charges_description == 'true') {
$one_time = ' <span> Your Price: ' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
//*********************************************************************************
//***Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
echo '<span id="whole">Wholesale Price: ';
} else {
echo '<span id="retail">';
}
echo $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_price((int)$_GET['products_id']);
echo '</span>';
//*********************************************************************************
//***END Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
?></h2>
<!--eof Product Price block -->
<!--bof free ship icon -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon -->
<!--bof Product description -->
<?php if ($products_description != '') { ?>
<div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
<?php } ?>
<!--eof Product description -->
<br class="clearBoth" />
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->
<!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
<br class="clearBoth" />
<?php
}
?>
<!--eof Product details list -->
<!--bof Attributes Module -->
<?php
if ($pr_attr->fields['total'] > 0) {
?>
<?php
/**
* display the product atributes
*/
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<?php
}
?>
<!--eof Attributes Module -->
<!--bof Quantity Discounts table -->
<?php
if ($products_discount_type != 0) { ?>
<?php
/**
* display the products quantity discount
*/
require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
<?php
}
?>
<!--eof Quantity Discounts table -->
<!--bof Additional Product Images -->
<?php
/**
* display the products additional images
*/
require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
<!--eof Additional Product Images -->
<!--bof Prev/Next bottom position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 2 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
* display the product previous/next helper
*/
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next bottom position -->
<!--bof Reviews button and count-->
<?php
if ($flag_show_product_info_reviews == 1) {
// if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
if ($reviews->fields['count'] > 0 ) { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></p>
<?php } else { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<?php
}
}
?>
<!--eof Reviews button and count -->
<!--bof Product date added/available-->
<?php
if ($products_date_available > date('Y-m-d H:i:s')) {
if ($flag_show_product_info_date_available == 1) {
?>
<p id="productDateAvailable" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_AVAILABLE, zen_date_long($products_date_available)); ?></p>
<?php
}
} else {
if ($flag_show_product_info_date_added == 1) {
?>
<p id="productDateAdded" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_ADDED, zen_date_long($products_date_added)); ?></p>
<?php
} // $flag_show_product_info_date_added
}
?>
<!--eof Product date added/available -->
<!--bof Product URL -->
<?php
if (zen_not_null($products_url)) {
if ($flag_show_product_info_url == 1) {
?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php
} // $flag_show_product_info_url
}
?>
<!--eof Product URL -->
<!--bof also purchased products module-->
<?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
<!--eof also purchased products module-->
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4ff326d22d3b21a9"></script>
<!-- AddThis Button END -->
<!--bof Tell a Friend button -->
<?php
if ($flag_show_product_info_tell_a_friend == 1) { ?>
<div id="productTellFriendLink" class="buttonRow forward"><?php echo ($flag_show_product_info_tell_a_friend == 1 ? '<a href="' . zen_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_TELLAFRIEND, BUTTON_TELLAFRIEND_ALT) . '</a>' : ''); ?></div>
<?php
}
?>
<!--eof Tell a Friend button -->
<!--bof Form close-->
</form>
<!--bof Form close-->
</div>
I'm having similar issue, using ZC 1.5.1 with the Carlisle Fresh theme. The wholesale prices don't show up until you put something in the cart. I compared the Dual Pricing tpl_product_info_display.php with that provided in the Carlisle Fresh theme. The pricing section of the code seems the same. Is this the relevant section that needs to be included?
Code:<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
//***********************************************************************
//***DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************
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 /> ';
}
//***********************************************************************
//***END DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************
if ($show_onetime_charges_description == 'true') {
$one_time = ' <span> Your Price: ' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
//*********************************************************************************
//***Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
echo '<span id="whole">Wholesale Price: ';
} else {
echo '<span id="retail">';
}
echo $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_price((int)$_GET['products_id']);
echo '</span>';
//*********************************************************************************
//***END Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
?></h2>
<!--eof Product Price block -->
For those with issues getting the wholesale price to display on the product page, can you post a url?
I was able to fix my problem with the prices not displaying by doing a reinstall. I installed COWOA after Dual Pricing and it made changes to some of the same core files. I thought I got them merged correctly but the reinstall showed I must have missed something. I'll try updating the 3 files for COWOA now that I know Dual Pricing is working as it should. Thanks for documenting your code changes in the source. I wish other programmers would do it as well as you do.
http://www.johnwoodsmotorcare.net/MG...roducts_id=379
Retail is £162.50, discount is £146.25 - Image attached shows RRP£ on main product and Trade £ at top in shopping cart
Attachment 14606
Hi
I used the tpl_product_info_display.php from the plugin. The only extra code that I merged from my original file was:-
Lines 18-30 inserted
and lines 267-284 insertedPHP Code:
<script type="text/javascript">
$(document).ready(function() {
jQuery(".content1").hide();
//toggle the componenet with class msg_body
jQuery(".heading").click(function()
{
jQuery(this).next(".content1").slideToggle(500);
jQuery(this).toggleClass("minus");
});
});
</script>
My current tpl_product_info_display.php in full is:-PHP Code:
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4ff326d22d3b21a9"></script>
<!-- AddThis Button END -->
<!--bof Tell a Friend button -->
<?php
if ($flag_show_product_info_tell_a_friend == 1) { ?>
<div id="productTellFriendLink" class="buttonRow forward"><?php echo ($flag_show_product_info_tell_a_friend == 1 ? '<a href="' . zen_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_TELLAFRIEND, BUTTON_TELLAFRIEND_ALT) . '</a>' : ''); ?></div>
<?php
}
?>
<!--eof Tell a Friend button -->
It must be something simple such as a comment or uncomment missing somewhere but I can't see it?PHP Code:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=product_info.<br />
* Displays details of a typical product
*
* @package templateSystem
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_product_info_display.php 19690 2011-10-04 16:41:45Z drbyte $
*/
//require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
?>
<script type="text/javascript">
$(document).ready(function() {
jQuery(".content1").hide();
//toggle the componenet with class msg_body
jQuery(".heading").click(function()
{
jQuery(this).next(".content1").slideToggle(500);
jQuery(this).toggleClass("minus");
});
});
</script>
<div class="centerColumn" id="productGeneral">
<!--bof Form start-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product', $request_type), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
<!--eof Form start-->
<?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>
<!--bof Category Icon -->
<?php if ($module_show_categories != 0) {?>
<?php
/**
* display the category icons
*/
require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
<?php } ?>
<!--eof Category Icon -->
<!--bof Prev/Next top position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
* display the product previous/next helper
*/
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next top position-->
<!--bof Main Product Image -->
<?php
if (zen_not_null($products_image)) {
?>
<?php
/**
* display the main product image
*/
require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
}
?>
<!--eof Main Product Image-->
<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->
<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
//***********************************************************************
//***DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************
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 /> ';
}
//***********************************************************************
//***END DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************
if ($show_onetime_charges_description == 'true') {
$one_time = ' <span> Your Price: ' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
//*********************************************************************************
//***Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
echo '<span id="whole">Wholesale Price: ';
} else {
echo '<span id="retail">';
}
echo $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_price((int)$_GET['products_id']);
echo '</span>';
//*********************************************************************************
//***END Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
?></h2>
<!--eof Product Price block -->
<!--bof free ship icon -->
<?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
<?php } ?>
<!--eof free ship icon -->
<!--bof Product description -->
<?php if ($products_description != '') { ?>
<div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
<?php } ?>
<!--eof Product description -->
<br class="clearBoth" />
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->
<!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
<br class="clearBoth" />
<?php
}
?>
<!--eof Product details list -->
<!--bof Attributes Module -->
<?php
if ($pr_attr->fields['total'] > 0) {
?>
<?php
/**
* display the product atributes
*/
require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
<?php
}
?>
<!--eof Attributes Module -->
<!--bof Quantity Discounts table -->
<?php
if ($products_discount_type != 0) { ?>
<?php
/**
* display the products quantity discount
*/
require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
<?php
}
?>
<!--eof Quantity Discounts table -->
<!--bof Additional Product Images -->
<?php
/**
* display the products additional images
*/
require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
<!--eof Additional Product Images -->
<!--bof Prev/Next bottom position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 2 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
* display the product previous/next helper
*/
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next bottom position -->
<!--bof Reviews button and count-->
<?php
if ($flag_show_product_info_reviews == 1) {
// if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
if ($reviews->fields['count'] > 0 ) { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></p>
<?php } else { ?>
<div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
<br class="clearBoth" />
<?php
}
}
?>
<!--eof Reviews button and count -->
<!--bof Product date added/available-->
<?php
if ($products_date_available > date('Y-m-d H:i:s')) {
if ($flag_show_product_info_date_available == 1) {
?>
<p id="productDateAvailable" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_AVAILABLE, zen_date_long($products_date_available)); ?></p>
<?php
}
} else {
if ($flag_show_product_info_date_added == 1) {
?>
<p id="productDateAdded" class="productGeneral centeredContent"><?php echo sprintf(TEXT_DATE_ADDED, zen_date_long($products_date_added)); ?></p>
<?php
} // $flag_show_product_info_date_added
}
?>
<!--eof Product date added/available -->
<!--bof Product URL -->
<?php
if (zen_not_null($products_url)) {
if ($flag_show_product_info_url == 1) {
?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php
} // $flag_show_product_info_url
}
?>
<!--eof Product URL -->
<!--bof also purchased products module-->
<?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
<!--eof also purchased products module-->
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4ff326d22d3b21a9"></script>
<!-- AddThis Button END -->
<!--bof Tell a Friend button -->
<?php
if ($flag_show_product_info_tell_a_friend == 1) { ?>
<div id="productTellFriendLink" class="buttonRow forward"><?php echo ($flag_show_product_info_tell_a_friend == 1 ? '<a href="' . zen_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_TELLAFRIEND, BUTTON_TELLAFRIEND_ALT) . '</a>' : ''); ?></div>
<?php
}
?>
<!--eof Tell a Friend button -->
<!--bof Form close-->
</form>
<!--bof Form close-->
</div>
@Purecarsound
The beta version has a bug. Check your PM.
You're a star ;-) The bug fix for 1.5.3 Beta Version worked great!
See Screen Capture, Retail Price Shows with Discount (wholesale) price below.
Attachment 14613
I just installed the version of Dual Pricing that goes with Zencart 1.5.1.
I use attributes because the items I make can either have a border (default) or not have a border (-10 retail).
The documentation under "How do I use it" says:
Attributes can be set in the same way (as product prices), but you need to enter the prices in the "Trade" field and use comma separation, eg. 50.00,30.00,0.00,25,00
Maybe I'm just missing something, but I see no "Trade" field in the attribute controller. Can someone please tell me where I'm supposed to this information in the attribute controller?
And can I use negative amounts (i.e. -10, -5)?
Many thanks,
Melissa
You can use negative values.
Below is a screen shot showing the Trade field price. If you do not see this in your store, check your installation. Especially your /ADMIN/attributes_controller.php
Attachment 14836
Hi All,
Great add-on.
Dual Pricing not showing correct wholesale price for products priced by attribute
I am running ZC 1.5.4 + Qty discount 1,1,2 and dual pricing 2.1.5 from github - Normal items ie not priced by attributes are working great.
1) no trade field in attributes editor ( search all files in all versions of plugin and field is definitely called wholesale) - no biggie
2) All levels of wholesale pricing are running for not attribute priced product. (i have 5)
3) If i put in 5 levels of attribute wholesale pricing in wholesale field (xx.00,yy.00,zz.00...
4) Non wholesale user gets right price
5) Level 1 user gets 2 prices in product info page as it should list and wholesale and in pull down for attributes gets list proce and xx.00 - All OK
6) level 1 then adds to cart and xx.00 is added to cart - All OK
Now Level 2 user
1) Product page shows whole sale (Retail/ wholesale) and retail All ok..
2) Add to cart - cart shows xx.00 ie the first wholesale in the list xx,yy,zz - WRONG...
The code i believe in the plug-in for /included/classes/shopping_cart is the is the problem.
There are multiple instances of the below code and I believe it is the fault:
The valueCode:ifif ($_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") {
$i = $customer_check->fields['customers_whole'];
$i--;
$options_value_price = (float)$attribute_price->fields['options_values_price_w'];
Is all wrong asCode:$options_value_price = (float)$attribute_price->fields['options_values_price_w'];
contains the attributes wholesale field ie xx.00,yy.00 as a string and floating it just screws it up and returns the first float value xx.00Code:$attribute_price->fields['options_values_price_w'
So how to do it?
I have tried
Problem is - it is still not working.Code: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") {
$i = (int)$customer_check->fields['customers_whole']; //Grab the Wholesale level as integer
$i--; //Decrement it as arrays start with [0]
// $options_value_price = (float)$attribute_price->fields['options_values_price_w']; // Comment out the old line
$brm_options_array = explode(",",$attribute_price->fields['options_values_price_w']); //explode the xx.00,yy.00,zz.00 string into an array
$options_value_price = (float)$brm_options_array[$i]; // pull the appropriate discount price for the wholesale level out - var_dump($options_value_price ) returns the correct attribute wholesale level
As I mentioned in shopping_cart.php there are about 3 instances of this code and I have tried all 3 - Just don't get how this works.
Or more importantly passes it to the html.
Any assistance would be appreciated.
Thanks in advance
@Whiterabbizt
Thank you for reporting this. I have confirmed the bug is in previous versions of this plugin as well. It's been added to the to-do list to fix.
Thank you for a wonderful module. I have read through all the topics here, and have used several threads to fix my issues (misconfigure, etc).
What I didn't pick up on is there a way to make a special wholesale group taxable?
I saw the Canadian solution to his multi tax issue, but I don't quite get how to limit it to a single group while leaving other groups untaxed.
If this was asked already, I am sorry. After alot of reading--on several topics, things have gotten blurred.
Thank you in advance to anyone able/willing to help.
Remember that Dual Pricing runs a loop to compare the logged in customer with a list of group id's then looks up the prices and returns the value associated with the logged in group. You will need to add a filter to all of the codes that are attempting to apply tax to that returned value to again ask 'who are you/what group do you belong to?' and 'should I be applying tax to the returned value if you belong to a group that matches the no tax group list.
If you are referring to Twitch Wholesale, it already has filters to shelter wholesale groups from taxes, they just need to be turned on in the code.
Note: Twitch Wholesale and Dual Pricing should not be installed together.
Hi everyone, I have a very simple question: how to make price=0 works?
I have v1.5.4 fresh installed and the Dual-Pricing-2.1.5-master for 1.5.4.
For the product I set up 4 prices 10.00-20.00-0.00-50.00. For the customer I made level 3.
Result: price that shows up is 10.00
If I put 10.00-20.00-0.01-50.00, price turns to 0.01
Can anyone help me on how to make a product free for a level?
I've confirmed this is a bug in this and previous versions. It will be fixed in a future release.
Thank You twitchtoo for pointing me in the right direction, I will dig deeper.
I installed the DualPricing 2.1.5-master file bundle.
Would 1 serve me better than the other can you recommend in this scenario?
In the meantime, I have discovered something else--not sure if its by design, or perhaps a bug.
After applying upcharge attributes to items--both in Price and in wholesale. I am only using 1 wholesale group currently, so just inputting 1 number in wholesale.
I then copy attributes to another similar item. I get the normal price to carryover, but the wholesale resets to 0 on the new item :(
Any thoughts or guidance?
place check here for fix the bugs: https://github.com/jeking928/Dual-Pr...2.1.5/issues/1
Mr. Guo,
I will test out on a fresh install the new code ...
Thanks ...
Mr. Guo and Mr. Jeking,
Grrrrrrr ....
I have tested this code to a brand new install of 1.5.4 with No OTHER Modules installed ...
It Displays correctly but FAILS when you add the Attribute Value to the Shopping Cart ...
Further CODE is Needed to the Shopping Cart because it shows the incorrect Value and all the Way thur the Checkout Procedure ...
Can anyone tell me how I could change the login/register page to show an option for wholesale customers to register?
Is there a way to configure free shipping to a certain wholesale level only? I want to set the lowest wholesale price for the pet stores we deliver to ourselves, but charge shipping to other customers.
You could very easily clone the shipping module and apply a wholesale filter to it. This works very well with Twitch Wholesale - You may even find the exact code you need in the support forum to accomplish this type of shipping filter. Just be sure to change the customers_wholesale field in Twitch Wholesale to the one used in Dual Pricing instead.