Zen Cart Logo

DUAL Pricing v2

Views: 363,307

Results 1,281 to 1,300 of 1,504
5 Jan 2015, 2:51 AM
#1281
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

DUAL Pricing v2

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

24 Jan 2015, 12:19 AM
#1282
whiterabbizt avatar

whiterabbizt

New Zenner

Join Date:
Sep 2009
Posts:
9
Plugin Contributions:
0

Re: DUAL Pricing v2

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:

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 ```
$options_value_price = (float)$attribute_price->fields['options_values_price_w'];


Is all wrong as ```
$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

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

24 Jan 2015, 3:59 PM
#1283
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: DUAL Pricing v2

@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.

29 Jan 2015, 4:51 AM
#1284
trignet avatar

trignet

New Zenner

Join Date:
Apr 2013
Location:
Petoskey, MI
Posts:
5
Plugin Contributions:
0

Re: DUAL Pricing v2

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.

29 Jan 2015, 12:10 PM
#1285
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,732
Plugin Contributions:
14

Re: DUAL Pricing v2

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.

29 Jan 2015, 7:40 PM
#1286
verzea avatar

verzea

New Zenner

Join Date:
Nov 2007
Posts:
11
Plugin Contributions:
0

Re: DUAL Pricing v2

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?

29 Jan 2015, 8:16 PM
#1287
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: DUAL Pricing v2

I've confirmed this is a bug in this and previous versions. It will be fixed in a future release.

30 Jan 2015, 2:50 AM
#1288
trignet avatar

trignet

New Zenner

Join Date:
Apr 2013
Location:
Petoskey, MI
Posts:
5
Plugin Contributions:
0

Re: DUAL Pricing v2

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?

30 Jan 2015, 2:55 AM
#1289
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,732
Plugin Contributions:
14

Re: DUAL Pricing v2

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.

30 Jan 2015, 2:57 AM
#1290
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: DUAL Pricing v2

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.

5 Feb 2015, 7:30 AM
#1292
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,176
Plugin Contributions:
0

Re: DUAL Pricing v2

Mr. Guo,
I will test out on a fresh install the new code ...
Thanks ...

5 Feb 2015, 5:01 PM
#1293
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: DUAL Pricing v2

jing.guo:

place check here for fix the bugs: https://github.com/jeking928/Dual-Pricing-2.1.5/issues/1

Thank you for the input. I've tested this and the fix does solve the problem. It will be incorporated into the next release.

7 Feb 2015, 12:29 AM
#1294
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,176
Plugin Contributions:
0

Re: DUAL Pricing v2

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 ...

7 Feb 2015, 12:51 AM
#1295
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: DUAL Pricing v2

haredo:

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 ...

That is correct. The wholesale attribute level pricing still does not work beyond the first level. It's on the to-do list. Not to be confused with the wholesale product price levels, which do.

9 Feb 2015, 2:58 AM
#1296
zappa_aviaries avatar

zappa_aviaries

New Zenner

Join Date:
Feb 2015
Location:
Frederic, Wisconsin, United States
Posts:
24
Plugin Contributions:
0

Re: DUAL Pricing v2

Can anyone tell me how I could change the login/register page to show an option for wholesale customers to register?

9 Feb 2015, 3:07 AM
#1297
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: DUAL Pricing v2

Zappa Aviaries:

Can anyone tell me how I could change the login/register page to show an option for wholesale customers to register?

Not needed or possible. All customers log in the same way. You decide if they are wholesale or not by setting the 'Wholesale pricing level' in the admin.

9 Feb 2015, 6:54 PM
#1298
zappa_aviaries avatar

zappa_aviaries

New Zenner

Join Date:
Feb 2015
Location:
Frederic, Wisconsin, United States
Posts:
24
Plugin Contributions:
0

Re: DUAL Pricing v2

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.

9 Feb 2015, 7:43 PM
#1299
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: DUAL Pricing v2

Zappa Aviaries:

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.

This could be done with a customization to the Free Shipping module to look for a specific wholesale pricing level, but would not be a function of this plugin.

11 Feb 2015, 12:22 AM
#1300
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,732
Plugin Contributions:
14

Re: DUAL Pricing v2

Zappa Aviaries:

Can anyone tell me how I could change the login/register page to show an option for wholesale customers to register?

You could add a simple checkbox to the login page that records the 'wholesale request' and any other form data you want to add to the database. Would require minimal coding on the login page and a couple new fields in the db.