Re: DUAL Pricing version 2
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:
Code:
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'];
The value
Code:
$options_value_price = (float)$attribute_price->fields['options_values_price_w'];
Is all wrong as
Code:
$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.00
So how to do it?
I have tried
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
Problem is - it is still not working.
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
Re: DUAL Pricing version 2
@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.
Re: DUAL Pricing version 2
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.
Re: DUAL Pricing version 2
Quote:
Originally Posted by
trignet
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.
Re: DUAL Pricing version 2
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?
Re: DUAL Pricing version 2
I've confirmed this is a bug in this and previous versions. It will be fixed in a future release.
Re: DUAL Pricing version 2
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?
Re: DUAL Pricing version 2
Quote:
Originally Posted by
trignet
Thank You twitchtoo for pointing me in the right direction, I will dig deeper.
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?
Which button or method are you using to 'copy' the products/attributes?
There needs to be a code in each of the control files that perform these 'actions'. If the code is missing the data will not be carried over.
Re: DUAL Pricing version 2
Quote:
Originally Posted by
trignet
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?
The copy attributes function will not copy the Dual Pricing settings. It does not know these fields exist. It's not really a bug, but a function never built in.
Re: DUAL Pricing version 2