New Zenner
- Join Date:
- May 2013
- Location:
- Fairfield, ia
- Posts:
- 13
- Plugin Contributions:
- 0
DUAL Pricing v2
How do I uninstall this plugin? I used the script, but when I did, it caused some problems.
Views: 363,344
New Zenner
How do I uninstall this plugin? I used the script, but when I did, it caused some problems.
Zen Follower
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
New Zenner
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?
Deceased
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
Administrator
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:
$70.00
Sale: $0.00 / 0
The price does display properly on the storefront. I'll post back once I've got a solution ...
Administrator
lat9:
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:
$70.00
Sale: $0.00 / 0
> The price does display properly on the storefront. I'll post back once I've got a solution ...
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:
//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 */
Administrator
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?
Totally Zenned
@lat9, please read post #1210 & #1211 ...
Administrator
haredo:
@lat9, please read post #1210 & #1211 ...
The changes that I made to correct this behavior were threefold (all in /includes/functions/functions_prices.php).
////
// 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;
}
and
////
// 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;
}
Totally Zenned
Would you be so kind and post the entire /includes/functions/functions_prices.php file for me ...
Administrator
Totally Zenned
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 ....
Administrator
Sorry, I haven't validated the attribute-related paths ... the base price path has been checked out and deployed.
Totally Zenned
Thats fine, well if you ever get a spare moment in your busy, hectic day ...
Totally Zenned
haredo:
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 ....
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.
Totally Zenned
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?
Totally Zenned
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.
Totally Zenned
Twitchtoo,
admin panel/ customers/customer/ wholesale customer
Dual Pricing
admin panel/ customers/ customer/ wholesale customer
Totally Zenned
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...
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...
Totally Zenned
Perhaps at this point it makes sense to move "Twitch Wholesale" discussions over to the "Twitch Wholesale" support thread rather than hijack this one..
Fields marked required must be completed.
Tell staff why this post should be reviewed.