=== WP e-Commerce - Wholesale Pricing ===
Contributors: Visser Labs
Tags: e-commerce, shop, cart, ecommerce, wholesale pricing
Requires at least: 2.9.2
Tested up to: 4.7.5
Stable tag: 1.8
== Description ==
Add wholesale pricing controls to your WP e-Commerce store.
For more information visit: http://www.visser.com.au/wp-ecommerce/
== Installation ==
1. Upload the folder 'wp-e-commerce-wholesale-pricing' to the '/wp-content/plugins/' directory
2. Activate the plugin through the 'Plugins' menu in WordPress
== Usage ==
Wholesale Pricing for WP e-Commerce integrates with custom User Roles in WordPress, what this means is you can create custom User Roles with specific access outside the traditional WordPress User Roles (e.g. Subscriber, Author, Moderator, etc.).
I've had alot of success integrating custom User Role pricing within WP e-Commerce using the User Role Editor Plugin (http://wordpress.org/extend/plugins/user-role-editor/) from shinephp, available for download from WordPress.org. Hope this helps!
To configure default pricing rules:
==== In WP e-Commerce 3.7 ====
1. Open Store > Wholesale Pricing
==== In WP e-Commerce 3.8 ====
1. Open Settings > Wholesale Pricing
====
2. Set default pricing levels for Products which do not have their own per-Product pricing rules. If you do want to add default pricing levels leave this as default.
==== In WP e-Commerce 3.7 ====
3. Open Store > Products
==== In WP e-Commerce 3.7 ====
3. Open Products > Add/Edit Products
====
4. Open an individual Product and under the Wholesale Pricing widget select the individual Product's pricing levels. Do note that the fixed price rule will always override the %/$-based pricing rules so set one of the other, not both.
5. Click Update to save changes
6. Have fun!
== Sidenotes ==
==== Product visibility base on User Role ====
To add the show/hide Product visibility based on User Role you can use the built-in filtering we employ on the Products Page and Single Product screen, if you require further customisation of element visibility see the following.
1. Open your root web directory with your favourite file explorer or FTP manager (e.g. FileZilla)
====== In WP e-Commerce 3.7 ======
Depending on whether you are using the default WP e-Commerce template files (e.g. /wp-content/plugins/wp-e-commerce/themes/%current_theme%/...) or have copied them to the 'safe' WP e-Commerce directory within Uploads (e.g. /wp-content/uploads/themes/%current_theme%/...) do as follow.
2. Open 'products_page.php' and paste '<?php if( wpsc_wp_is_product_visible() ) : ?>' on line #82
3. Open 'single_product.php' and paste '<?php if( wpsc_wp_is_product_visible() ) : ?>' on line #26
====== In WP e-Commerce 3.8 ======
Depending on whether you are using the default WP e-Commerce template files (e.g. /wp-content/plugins/wp-e-commerce/wpsc-theme/...) or have copied them to your current WordPres Theme directory (e.g. /wp-content/themes/%current_theme%/...) do as follow.
2. Open 'wpsc-products_page.php'
2.1 Copy the following snippet and paste it below "<?php while (wpsc_have_products()) : wpsc_the_product(); ?>" on line #66
<?php if( wpsc_wp_is_product_visible() ) : ?>
2.2 Paste the following snippet and paste it above "<?php endwhile; ?>" on line #227
<?php endif; ?>
3. Open 'wpsc-single_product.php'
3.1 Copy the following snippet and paste it below "<?php while (wpsc_have_products()) : wpsc_the_product(); ?>" on line #30
<?php if( wpsc_wp_is_product_visible() ) : ?>
3.2 Copy the following snippet on paste it above "<?php endwhile; ?>" on line #214
<?php endif; ?>
======
4. Save changes and upload modified files
==== Original Price ====
Display the original Price before markup/markdown within your store with the following template tag (e.g. Original Price: $20.00).
Drop the following template tag into your Products Page and/or Single Product template, then save changes and upload modified files.
Original Price: <?php echo wpsc_wp_original_price(); ?>
==== You Save ====
Display the saving between standard Product price and the current User Role's markup/markdown (e.g. You Save: $5.00 (25.00%))
Drop the following template tag into your Products Page and/or Single Product template, then save changes and upload modified files.
You Save: <?php wpsc_wp_you_save( array( 'type' => 'amount' ) ); ?> (<?php wpsc_wp_you_save(); ?>)
=== User Role Price ===
Display the Price for a given User Role using the following template tag (e.g. Member's Price: $5.95).
Drop the following template tag into your Products Page and/or Single Product template, then save changes and upload modified files.
Member's Price: <?php wpsc_wp_role_price( 'subscriber' ); ?>
Replace 'subscriber' with the User Role 'slug', here's the default User Role slugs in WordPress.
- administrator
- editor
- author
- contributor
- subscriber
- guest
== Support ==
If you have any problems, questions or suggestions please join the members discussion on my WP e-Commerce dedicated forum.
http://www.visser.com.au/wp-ecommerce/forums/
== Disclaimer ==
This Plugin does not claim to be a PCI-compliant solution. It is not responsible for any harm or wrong doing this Plugin may cause. Users are fully responsible for their own use. This Plugin is to be used WITHOUT warranty.
I have your plugin installed on my website and the wholesale pricing is working but the functionality of hiding a product to visitors is not working. I want to be able to have certain products hidden from everybody but approved wholesale customers, and I can’t seem to get it working.
Hi Dan, I’ve replied to your e-mail, see below.
Can you please confirm that you’re using the wpsc_wp_is_product_visible() template tag within your Single Product/Products Page template. This is detailed within the Plugin’s readme.txt. Please let me know if you still have issues after this as I’ll investigate this immediately. Here’s an example usage:
< ?php if( wpsc_wp_is_product_visible() ) : ?>
[…] Add to cart/Product Price code […]
< ?php endif; ?>
I have the same question that Shelly asked back on November 8th.
Can we get an answer to this please?
Thanks
——————
Shelly Caldwell says:
November 8, 2011 at 8:47 am
Did you ever get an answer about whether or not we can “Hide” all pricing unless someone has been an approved/registered user? I may not need this plugin since we’re only going to sell wholesale – just need to be able to somehow hide all pricing and buy now buttons to users who haven’t been approved.
Thank you
Hi Shayne, apologies for missing your question. Yes this is done via the Visibility dropdown on the Add/Edit Products page. 🙂
Hy,
Is it possible to see old price of product (before adding to cart) and new wholesale price together in shopping cart?
I am trying to implement but with no luck.
Thanks!
Hi Ivana, as Wholesale Pricing overrides the WP e-Commerce Price controls on the Products Page/single Product page you’ll need to query the price directly.
< ?php echo wpsc_currency_display( get_product_meta( $product_id, 'price', true ),null,true ) ); ?>
Thank you for the solution,
– it works for one product in shopping cart(i added the code in : wpcs_cart_widget), but when I add another product in the cart it is showing the old price of last added product for all products in the cart.
Any idea how to override this?
Hi – we have purchased this plugin. It is correctly updating price for variations only but not for the default product price. We have latest version of wp-ecommerce and from your read me file it looks as though we do not need to follow any steps to update the core wp-ecommerce plugin. Please confirm.
see http://3cs.pushkadev.com/products/mens-outerwear/nation-jacket/
which is $100 but should be $150 with 50% markup for all user levels. It only changes to $150 when a variation is selected.
Any ideas?
Are you able to let me know if you have come across this problem before?
Hi! I’m wondering if this plugin can be used to help calculate profit in the sales dashboard. It seems that, if we have a wholesale price per variation, and the variation retail price, it should be possible, no?
Sadly, my PHP skills are not yet so advanced that I can write it myself, but I wonder if you can convince the wp e-commerce folks to include profit reporting in conjunction with your plugin? It would be awfully nifty.
Thanks! Great work!
Hi Jenn, something very similar to this is on my todo list. It’ll be a few weeks off though so might be a pre-Christmas feature. 🙂
Hi Michael,
I’d love to have profit calculation on WP-Ecommerce dashboard. Any news about the work-in-progress thing you said on novembre 22?
Thanks for the great work on WPEC.
Gianni
Hi Gianni, thanks for the bump. It’s been a mad month, I’ll be benching this one until the new year as I have a few ideas on how to implement this nicely and want to do it right. 🙂
Will this plugin be compatible with a theme that utilizes WP Ecommerce?
Hi Nina, sure will. If you run into any issue get in touch as I’ll work with the original Theme developer or patch your Theme but typically any WordPress Theme that can run WP e-Commerce will play nice with Wholesale Pricing as well as my other Plugins. 🙂
Hi Michael. I’ve upgraded to 3.8.7 and things are working well so upgrading solved the problem of not displaying the fixed pricing on my site. I’m about to tackle Variations but I have a few questions.
1) Does the wholesaler plugin only effect the Variation’s price? (does it cut it by 50% for a particular role if 50% is indicated in the Wholesaler plugin’s configuration page)
OR
2) Does the wholesaler plugin allow you to configure which variations appear as options depending on the role of the shopper?
I’m asking because I need my wholesale shoppers to have the option to add frames (as the variation) to the prints that they order but NOT have this option available to or even seen by any other shopper roles.
With this plugin, do you have the capability to create custom/wholesale shipping?
Hi X, Wholesale Pricing just affects the Product Price/Sale Price based on User Roles and capabilities, I have not looked into wholesale shipping options but am happy to explore this with you if you can provide additional information about what you’re after. 🙂
My take on this for a site I’m finishing up and this is the last thing I need to figure out. the site will generally only sell a single or at most 2 items to retail customers but wholesaler orders will be multiple items per order.
Ideally if Wholesale customers could be limited to Table Rate only. that would awesome.
I’m guessing a more robust solution would include the ability to set which “shipping options” to show based on user role
Is volume-based discounting coming soon? This is the functionality I need: it would be great to get an idea of when it might be implemented.
Thanks!
hi,
i have try many times and waste my many days only for product variation price but still it is not working i have update all thing i have use 3.8 wp e commerce and latest wholesale plugin so whats wrong with me please help me as soon as possible i will sure give buy a beer for you 🙂
Hi vikash, I’m testing the latest Wholesale Pricing against 3.8.7 to confirm if support has been added by the GetShopped.org team; removing the need for changes to Core (WP e-Commerce) files. I’ll update here shortly.
Hi Vikash,
I have a problem with my product variation price as well, since I updated to wpec 3.8.7.1. When I update a product variation, the price of the last product on the page is updated .. maybe this is your problem as well?
See this thread: http://getshopped.org/forums/topic/variation-display-problem/
I just added wholesale pricing to my site and got the following error when i click on ‘wholesale pricing’ under setting in my dashboard – im running lates version of wp e-comm, wp and wholesale pricing;
Warning: include(/templates/admin/wpsc-admin_wp_settings.php) [function.include]: failed to open stream: No such file or directory in /home/domains/domain.com.au/public_html/wp-content/plugins/wp-e-commerce-wholesale-pricing/wholesale-pricing.php on line 106
Warning: include() [function.include]: Failed opening ‘/templates/admin/wpsc-admin_wp_settings.php’ for inclusion (include_path=’.:/usr/local/php5/lib/php’) in /home/domains/domain.com.au/public_html/wp-content/plugins/wp-e-commerce-wholesale-pricing/wholesale-pricing.php on line 106
any ideas how to fix this?
also, in addition to my issue above, in the instructions 3.6 Replace the following snippet “$sale_price = get_product_meta($product_id, ‘price’, true);” on line #1811 in /wp-content/plugins/wp-e-commerce/wpsc-includes/product-template.php – this snippet doesn’t exist?
and
3.2 Copy the following snippet and paste it above “$args = array( … );” on line #409 in /wp-content/plugins/wp-e-commerce/wpsc-includes/product-template.php – I dont see this on line 409, its 405.
Hi Nicole, please ensure you either delete the existing Plugin files and upload a fresh copy if you’re updating via FTP or use the WordPress Plugin updater. I cannot reproduce this fault so suspect some files have not been copied during the update.
Feel free to get in touch as I can look into this further with you. 🙂
Nicole,
In “plugins/wp-e-commerce-wholesale-pricing/wholesale-pricing.php” on line 106 remove the first backslash.
So,
include( ‘/templates/admin/wpsc-admin_wp_settings.php’ );
becomes
include( ‘templates/admin/wpsc-admin_wp_settings.php’ );
Hi bnance63, this fix has been cooked into the 1.6.6 Plugin update.
I’m having the exact same issue. I used to be able to access the plugin via
Dashboard > Wpec > Wholesale Pricing, but now all I get are those two error statements. This happened after giving Michael access to the wp-admin of my site so he could fix the “Fixed Pricing” function of the wholesale plugin. Fixed Pricing still doesn’t work and now these errors on the admin page for the Wholesale Plugin. I’m totally at a loss as to why it isn’t working and why I haven’t gotten a response this whole week.
Hi jimario, the beta I installed on your store included the menu issue that’s now been resolved in 1.6.6. I will confirm later today whether the update sorts your WP e-Commerce 3.7 pricing issue. 🙂
Have you noticed how a product that has been set for a fixed price for wholesale users shows up as $1? Beetle Chase, which is the first print on the Prints page is regularly $40 but has a wholesaler rate of $50. But when logged in as a wholesaler, the price says $1.
(choochooclan.com)
I’ve been using your wholesale plugin for awhile with no problem. I now want to set a specific wholesale for certain products rather than just using a general % for all wholesalers. If I understand correctly, I should be able to do this while editing a product using the wholesale widget at the end of the product edit section. However, when I change the Wholesaler role’s markup to + 150 $ and then click the “Update Product” button, the change is not noticeable when logged in as a wholesaler. The regular price just shows.
I’m using WPEC 3.7.7
I’m using WordPress 3.0.4
In the Pricing Settings (Store > Wholesale Pricing), I have Wholesaler role checked but just the default settings.
I forgot to mention, I’m using version 1.6.3 of the Wholesale Pricing plugin. How do I go about getting or updating to version 1.6.4?
okay, so I figured how to get the update. I’ve updated the plugin but I’m still having the same problem. I can’t override the default price with a product specific amount I enter in the product editing section of a specific product. As a matter of fact, any amount that I enter in the Fixed Price field for a user role disappears after I’ve pressed the Update Product button.
Hi jimario, it sounds like the fixed price under WP e-Commerce 3.7 isn’t being saved to the database from the Add/Edit Products page. I’ll take a look at this now and prep it for release this weekend.
In the meantime feel free to contact me directly via e-mail with FTP and WP Admin as I’ll patch your site in the meantime. 🙂
information sent
The new automated Plugin Update system via Dashboard > Updates will make this alot easier. Glad you found the Premium Plugin Updates page though. 🙂
http://www.visser.com.au/wp-ecommerce/premium-plugin-updates/
A pet hate of mine has been the need to access my site to download Plugin updates, we’re using WordPress let’s do Plugin updates like they do! 🙂
any luck fixing this?
Hi Michael,
Can you verify the instructions for updating the product templates for hiding/showing products?
The readme says:
2. Open 'wpsc-products_page.php' and paste '' on line #66
3. Open 'wpsc-single_product.php' and paste '' on line #30
Does the your function call come before or after the beginning of product loop? Does it replace part of the loop?
My files have code on the stated line numbers, so I’m not clear where you code should go.
I have tried it everywhere I could think of and it breaks the site.
Follow up questions. Do we need an
endif
anywhere?Thanks!
Hi Brad, you’ll need to place a ‘< ?php endif; ?>‘ at the end. I’ve updated the readme.txt to reflect this, here’s a copy.
Products Page
1. Paste the following snippet on line #67 of wpsc-products_page.php (the line immediately after
< ?php while (wpsc_have_products()) : wpsc_the_product(); ?>
.< ?php if( wpsc_wp_is_product_visible() ) : ?>
2. Paste the following snippet on line #227 of wpsc-products_page.php (the line immediately above
< ?php endwhile; ?>
.< ?php endif; ?>
Single Product
1. Paste the following snippet on line #30 of wpsc-single_product.php (the line immediately after
< ?php while (wpsc_have_products()) : wpsc_the_product(); ?>
.< ?php if( wpsc_wp_is_product_visible() ) : ?>
2. Paste the following snippet on line #214 of wpsc-single_product.php (the line immediately above
< ?php endwhile; ?>
.< ?php endif; ?>
Michael,
Thanks for looking into this. Hiding products seems to work for Administrator roles, but not visitors/guests. I have Wholesale Pricing enabled and checked all of the user roles. When I select “Hide Product” for the Administrators, it does get hidden. However, for the Site Visitor/Guest it does not.
Any other ideas that might help me resolve this?
Thanks!
Hi bnance63, this is sorted in the next Plugin update coming out in the next 30 minutes. I’m pushing Plugin updates across the suite right now 🙂
Michael,
Is it already possible to hide product for the Visitor/Guest role? It’s not working for me now, I’m running the latest version of Wholesale pricing.
Thanks in advance.
Hi Paul, if you’ve dropped the template function into the required Theme files then it should be working. If you’re still experiencing issues get in touch as I’ll investigate this further. 🙂
Hello! I am working on this site for a client and need to get the wholesale area working as quickly as possible as it is really important for her business. Unfortunately I cannot get the plugin to work – I’ve gone through the instructions, updated the wp e-commerce plugin with the new code, and read through the forums. Can you please help me figure this out? When I set any of the settings on the back-end of the site – it does not reflect any changes on the front-end.
Thanks!!
Hi Hailey, I’m very sorry that you’re having trouble. I’ve got my fixes included in the next 3.8.7 Plugin update of WP e-Commerce which will make things alot easier going forward; no need to patch files! Please e-mail me your login details (WP Admin and FTP) so I can look into this for you. 🙂
Got to the bottom of this one, a custom change was required in the WordPress Theme in use on the site. Pays to use standard WP e-Commerce template tags where possible. 🙂
I can’t get the wholesale prices to display. I am trying to implement the code changes in the text file. But it doesn’t seem to change my site. Can someone help or post there code?
Anyone?
Hi Mark, I just sent a reply to your e-mail. Please refer to the readme.txt for install instructions. 🙂
MIchael,
This isn’t working still. One issue is that I cannot find this in the php to change. The price will display once you choose a variant but I would like it to display the price before you choose your variant. Also, I can’t get it to display the new price on the product listing page.
3.6 Replace the following snippet “$sale_price = get_product_meta($product_id, ‘price’, true);” on line #1811 in /wp-content/plugins/wp-e-commerce/wpsc-includes/product-template.php
$regular_price = wpsc_calculateprice( $product_id, null, false );
Hi Mark, I can’t wait for 3.8.7 as it’s got all these fixes baked into the Core Plugin. Feel free to send me an e-mail if you’d like me to jump in as those instructions were based on an earlier 3.8 release; I’m about to make a minor Plugin update for Wholesale Pricing so will update the readme.txt this morning to match 3.8.6. 🙂
I downloaded the update. Has the readme changed?