Zen Cart Logo

DUAL Pricing v2

Views: 363,300

Results 1,381 to 1,400 of 1,504
28 Oct 2016, 8:03 PM
#1381
jeking avatar

jeking

Totally Zenned

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

DUAL Pricing v2

ideasgirl:

Upgrade 1.5.1 to 1.5.5a
PHP Version: 5.6.22

Everything went smooth but the wholesales price is not showing up after login in. Screenshots included:
Attachment 16764Attachment 16765Attachment 16766Attachment 16767

What may I be missing? I inserted the dual pricing part into my tpl_product_info_display.php and even uploaded the original file from the pack to see if it was my integration and the wholesale price didn't show up neither.

Your first screen shot looks to be of Group Pricing. This cannot be used with Group Pricing, one or the other.

For the price display on the product page, that is most likely due to tpl_product_info_display.php not being merged correctly with your template

So to get Dual Pricing, the customer is assigned to one of the pricing bands, 0, 1, 2, 3 or 4 and not a Group. That could also be why pricing is not displaying on the product page.

28 Oct 2016, 8:28 PM
#1382
ideasgirl avatar

ideasgirl

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,437
Plugin Contributions:
3

Re: DUAL Pricing v2

Your first screen shot looks to be of Group Pricing. This cannot be used with Group Pricing, one or the other.
Ok, I deleted those now.

The customer screen doesn't show any text box to enter the level of the customer.

For the price display on the product page, that is most likely due to tpl_product_info_display.php not being merged correctly with your template
Like I said in my post, I uploaded the original from the pack and it didn't show up neither. So I believe now the issue is on the customer screen not showing the textfield to enter the level.

28 Oct 2016, 8:45 PM
#1383
jeking avatar

jeking

Totally Zenned

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

Re: DUAL Pricing v2

If you're not seeing this on the customer page in the admin, then the plugin is not properly installed.

Attachment 16768

28 Oct 2016, 8:57 PM
#1384
ideasgirl avatar

ideasgirl

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,437
Plugin Contributions:
3

Re: DUAL Pricing v2

ok, I thought it was located under the email subscription, not under email. GOT IT! It wasn't showing prices on front end but I log off and logged in and they showed up. THANKS! :blush:

28 Oct 2016, 9:10 PM
#1385
jeking avatar

jeking

Totally Zenned

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

Re: DUAL Pricing v2

ideasgirl:

ok, I thought it was located under the email subscription, not under email. GOT IT! It wasn't showing prices on front end but I log off and logged in and they showed up. THANKS! :blush:

Glad you got it working! Yes, you do need to log out and back in when making changes to the customer pricing level.

14 Nov 2016, 9:13 PM
#1386
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: DUAL Pricing v2

I have noticed in this thread a few years back that there was a discussion having this plugin work with the minimum order plugin. Has anyone had any success with ZC 1.5.5a with the ability to have different minimum order amounts for wholesale or retail customers.
Thanks

14 Nov 2016, 11:58 PM
#1387
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

allmart:

I have noticed in this thread a few years back that there was a discussion having this plugin work with the minimum order plugin. Has anyone had any success with ZC 1.5.5a with the ability to have different minimum order amounts for wholesale or retail customers.
Thanks

Yes for 1.54... :) Shouldn't be too much different to install into 1.55x although I haven't tried just yet. Needs custom code to include the ws/rt switches.

15 Nov 2016, 9:28 PM
#1388
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: DUAL Pricing v2

Any suggestion of where to start, please.

17 Nov 2016, 8:29 PM
#1389
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: DUAL Pricing v2

I was able to figure out from the Minimum Order plugin thread how to differentiate retail or wholesale customers in the : /includes/classes/observers/class.minimum_order_amount.php file by adding "if ($_SESSION['customer_whole'] != '' = 1)" indicating the customer is a wholesale customer. I just can't figure out the coding to change the minimum order value based on if the customer is retail or wholesale since I want two different amounts. This is part of the existing coding```
if ($_SESSION['customer_whole'] != '' = 1 ) {
if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
$_SESSION['valid_to_checkout'] = false;
$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT + 100)) . '<br />',

'caution');
}
}
}
}


Any help with trying to achieve this is greatly appreciated.
21 Nov 2016, 8:45 PM
#1390
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: DUAL Pricing v2

Ok I figured it out, might be sloppy but it works. For the code below, if the customer is a retail customer than the minimum order is what is set in admin. If the customer is a wholesale customer in this case the minimum order is $300. Just replace all instances of 300 (in red) to what you desire. Ideally you can add a field in your database and change the coding instead of having to modify this file. Hope someone finds this helpful.

<?php
/**
 * class.minimum_order_amount.php
 *
 * @copyright Copyright 2005-2007 Andrew Berezin eCommerce-Service.com
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: config.minimum_order_amount.php 1.0.1 20.09.2007 0:06 AndrewBerezin $
 */

/**
 * Observer class used to check minimum order amount
 *
 */
class minimum_order_amount extends base {
  /**
   * constructor method
   *
   * Attaches our class to the ... and watches for 4 notifier events.
   */
  function minimum_order_amount() {
    global $zco_notifier;
//      $_SESSION['cart']->attach($this, array('NOTIFIER_CART_GET_PRODUCTS_START', 'NOTIFIER_CART_GET_PRODUCTS_END'));
    $zco_notifier->attach($this, array('NOTIFY_HEADER_END_SHOPPING_CART', 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING', 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT', 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'));
  }
  /**
   * Update Method
   *
   * Called by observed class when any of our notifiable events occur
   *
   * @param object $class
   * @param string $eventID
   */
  function update(&$class, $eventID) {
    global $messageStack;
    global $currencies;
	global $db;
    switch ($eventID) {
      case 'NOTIFIER_CART_GET_PRODUCTS_END':
      case 'NOTIFY_HEADER_END_SHOPPING_CART':
	    if (isset($_SESSION['customer_id'])){
			$prevOrders = $db->Execute("SELECT count(orders_id) total_orders FROM ".TABLE_ORDERS." WHERE customers_id = ".(int)$_SESSION['customer_id']);
			if ((int)$prevOrders->fields['total_orders'] == 0) {
				if ($_SESSION['customer_whole'] != '' < 1) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_FIRST_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < MIN_FIRST_ORDER_AMOUNT) {
					$_SESSION['valid_to_checkout'] = false;
					$messageStack->add('shopping_cart', sprintf(TEXT_FIRST_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_FIRST_ORDER_AMOUNT)) . '<br />', 'caution');
				  }
				}
				}
			 
			
			
			
			
   /**
   * BOF Wholesale MinOrder $300.00
   */		
   
						if ((int)$prevOrders->fields['total_orders'] == 0) {
				if ($_SESSION['customer_whole'] != '' > 0 ) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_FIRST_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < 300) {
					$_SESSION['valid_to_checkout'] = false;
					$messageStack->add('shopping_cart', sprintf(TEXT_FIRST_ORDER_UNDER_MIN_AMOUNT, $currencies->format(300)) . '<br />', 'caution');
				  }
				}
				}
			} 
			}
   /**
   * EOF Wholesale MinOrder 
   */		
			
			
			
			
			
			
			else {
				if ($_SESSION['customer_whole'] != '' < 1 ) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
					$_SESSION['valid_to_checkout'] = false;
					$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
				  }
				}
			}
		
			
			
   /**
   * BOF Wholesale MinOrder 
   */		

				if ($_SESSION['customer_whole'] != '' > 0 ) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < 300) {
					$_SESSION['valid_to_checkout'] = false;
					$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(300)) . '<br />', 'caution');
				  }
				}
			}
			}
		
   /**
   */		
			
			
			
			
		} else {
			if ($_SESSION['customer_whole'] != '' < 1) { 
			if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
			  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
				$_SESSION['valid_to_checkout'] = false;
				$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
			  }
			}
		}
	
		
		
   /**
   * BOF Wholesale MinOrder 
   */		
	
				if ($_SESSION['customer_whole'] != '' > 0 ) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < 300) {
					$_SESSION['valid_to_checkout'] = false;
					$messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(300)) . '<br />', 'caution');
				  }
				}
			}
			}
		
   /**
   * EOF Wholesale MinOrder 
   */	
		
		
		
		
		
		
        break;
      case 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING':
      case 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT':
      case 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION':
	    if (isset($_SESSION['customer_id'])){
			$prevOrders = $db->Execute("SELECT count(orders_id) total_orders FROM ".TABLE_ORDERS." WHERE customers_id = ".(int)$_SESSION['customer_id']);
			if ((int)$prevOrders->fields['total_orders'] == 0) {
				if ($_SESSION['customer_whole'] != '' < 1) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_FIRST_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < MIN_FIRST_ORDER_AMOUNT) {
					zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
				  }
				}
				}
			
			
	
   /**
   * BOF Wholesale MinOrder 
   */			
	
				if ((int)$prevOrders->fields['total_orders'] == 0) {
				if ($_SESSION['customer_whole'] != '' > 0) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_FIRST_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < 300) {
					zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
				  }
				}
				}
			} 
			}		
	
   /**
   * EOF Wholesale MinOrder 
   */
			
			
			else {
				if ($_SESSION['customer_whole'] != '' < 1) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
					zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
				  }
				}
			}
			
			
			
			
			
			
   /**
   * BOF Wholesale MinOrder 
   */		
			
					if ($_SESSION['customer_whole'] != '' > 0) { 
				if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
				  if($_SESSION['cart']->show_total() < 300) {
					zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
				  }
				}
			}
			}
			
   /**
   * EOF Wholesale MinOrder 
   */		
			
			
			
			
			
		} else {
			if ($_SESSION['customer_whole'] != '' < 1) { 
			if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
			  if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
				zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
			  }
			}
		}
		
		
		
		
   /**
   * BOF Wholesale MinOrder 
   */		
		
				if ($_SESSION['customer_whole'] != '' > 0) { 
			if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
			  if($_SESSION['cart']->show_total() < 300) {
				zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
			  }
			}
		}

		}
   /**
   * EOF Wholesale MinOrder 
   */		
		
		
        break;
      default:
        break;
    }
  }
}
?>
22 Feb 2017, 7:19 PM
#1391
vyardain avatar

vyardain

New Zenner

Join Date:
Apr 2015
Location:
PA
Posts:
2
Plugin Contributions:
0

Re: DUAL Pricing v2

Attributes and Dual Pricing:

Has anyone gotten attribute pricing to work properly on a 1.5.5d installation?

I am working on a fresh install with a theme/skin/template but no other mods at the moment and while the dual pricing mod works for the base price (showing wholesale customers both the retail price and the wholesale and properly charging wholesale when the product is added to the cart), attributes are only using the retail price difference.

tl;dr Attributes only show retail pricing and when added to the cart subtract only retail pricing even when clearly seeing the effects of dual pricing on the base price.
ZC 1.5.5
PHP 5.6

Thanks for any information you can provide!

22 Feb 2017, 10:54 PM
#1392
jeking avatar

jeking

Totally Zenned

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

Re: DUAL Pricing v2

vyardain:

Attributes and Dual Pricing:

Has anyone gotten attribute pricing to work properly on a 1.5.5d installation?

I am working on a fresh install with a theme/skin/template but no other mods at the moment and while the dual pricing mod works for the base price (showing wholesale customers both the retail price and the wholesale and properly charging wholesale when the product is added to the cart), attributes are only using the retail price difference.

tl;dr Attributes only show retail pricing and when added to the cart subtract only retail pricing even when clearly seeing the effects of dual pricing on the base price.
ZC 1.5.5
PHP 5.6

Thanks for any information you can provide!

This does work on 1.5.5. It's been awhile since I've looked the code, as I recall you set the attribute pricing for each level. I'm not clear on the 'difference' you are referring to. Can you share a url?

23 Feb 2017, 5:21 PM
#1393
vyardain avatar

vyardain

New Zenner

Join Date:
Apr 2015
Location:
PA
Posts:
2
Plugin Contributions:
0

Re: DUAL Pricing v2

Hi Jeking, Thanks for getting back to me. When I say "difference" the attribute in question actually reduces the product price so I am using "difference" in the subtraction sense.

Basically our MSRP customers should see a -100$ shift in the cost of the product when they select "DC Only" whereas the dealers should see -60$ shift in the price.

This is happening on all of our products, but I am direct linking to one here just to save you some hassle:
http://www.korea-brass-usa.com/index.php?main_page=product_info&cPath=65&products_id=190

You can use this testing pricing bracket 1 username and password to see the effects of the dual pricing mod:
username: [email protected]
password: testdealer

Here is a screen cap of the attributes controller so you can see the pricing setup in there:
Attachment 16951

23 Feb 2017, 11:06 PM
#1394
jeking avatar

jeking

Totally Zenned

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

Re: DUAL Pricing v2

That's not how the wholesale attribute pricing was designed to be used. From the ReadMe:

  1. Attributes can be set in the same way, but you need to enter the prices in the "Trade" field and use comma separation, eg. 50.00,30.00,0.00,25,00

The field is now labeled "Wholesale Price", just to clarify.

29 Mar 2017, 10:01 PM
#1395
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: DUAL Pricing v2

I apologize for not reading back through all the comments to see if this has been addressed somewhere else.

I've had the wholesale pricing plugin installed for a while but have only just begun adding wholesale prices to my products. I see that it's possible to add prices by attribute, but the wholesale price doesn't appear in the drop down list that the wholesale customer sees. They have to actually add the product to their cart in order to see the wholesale price. Is there any likelihood of this being changed so wholesale prices will display properly on the product page? I see that it does work for items that are not priced in the attrirbutes.

30 Mar 2017, 12:50 AM
#1396
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

HeleneWallis:

I apologize for not reading back through all the comments to see if this has been addressed somewhere else.

I've had the wholesale pricing plugin installed for a while but have only just begun adding wholesale prices to my products. I see that it's possible to add prices by attribute, but the wholesale price doesn't appear in the drop down list that the wholesale customer sees. They have to actually add the product to their cart in order to see the wholesale price. Is there any likelihood of this being changed so wholesale prices will display properly on the product page? I see that it does work for items that are not priced in the attrirbutes.

This is the result of using dropdowns to display attribute price... without the price code being duplicated in that particular coding block.

To correct it, you'll need to add the wholesale price loop to the attributes dropdown pricing code block.

31 Mar 2017, 3:43 PM
#1397
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: DUAL Pricing v2

twitchtoo:

This is the result of using dropdowns to display attribute price... without the price code being duplicated in that particular coding block.

To correct it, you'll need to add the wholesale price loop to the attributes dropdown pricing code block.

And that would be where? I've looked at function_prices.php and see where the dual pricing code is inserted, but I don't immediately see what to add or where. Or even if that's the correct program to add it to.

24 Apr 2017, 6:28 PM
#1398
allmart avatar

allmart

Zen Follower

Join Date:
Feb 2016
Location:
Canada
Posts:
192
Plugin Contributions:
0

Re: DUAL Pricing v2

Hello,

I am hoping for some guidance with the dual pricing add-on and minimum order add-on for wholesale customers. I have had success with assigning a minimum order amount in "class.minimum_order_amount.php" (see previous post #1389) however; I now want the flexibility to have different minimum order amounts for different wholesale customers. I have created a new field in my database called "customers_minorder" which can be changed to any value in "customers.php" through the admin panel. The problem I have is accessing the value of "customer_minorder" in the "class.minimum_order_amount.php" file for the minimum order add-on. Any guidance on the syntax to access this value will be greatly appreciated.

Thanks

9 Jun 2017, 11:04 PM
#1399
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: DUAL Pricing v2

Just a note on the installation. Great work on identifying where the changes are located in the files. Makes merging easier.
I believe there's a small error on line 39 of each README.txt. Shouldn't2. Attributes can be set in the same way, but you need to enter the prices in the "Wholesale Price" field and use comma separation, eg. 50.00-30.00-0.00-25,00be```
2. Attributes can be set in the same way, but you need to enter the prices in the "Wholesale Price" field and use comma separation, eg. 50.00,30.00,0.00,25.00

10 Jun 2017, 12:01 AM
#1400
jeking avatar

jeking

Totally Zenned

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

Re: DUAL Pricing v2

dbltoe:

Just a note on the installation. Great work on identifying where the changes are located in the files. Makes merging easier.
I believe there's a small error on line 39 of each README.txt. Shouldn't```

  1. Attributes can be set in the same way, but you need to enter the prices in the "Wholesale Price" field and use comma separation, eg. 50.00-30.00-0.00-25,00
    be
  2. Attributes can be set in the same way, but you need to enter the prices in the "Wholesale Price" field and use comma separation, eg. 50.00,30.00,0.00,25.00

@dbltoe Thanks for pointing that out. I'll update that for the next version.