PrestaShop Forum: Build a free online shop. Count on the Community!

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum: Build a free online shop. Count on the Community!

Jump to content

 
Photo

Wholesale support (presta 1.3.0.1)


  • Please log in to reply
70 replies to this topic
prsut

    PrestaShop Apprentice

  • Members
  • PipPip
  • 65 posts

Posted 30 January 2010 - 05:03 PM

Hello all,
maybe you find this useful.
This is support for wholesale. Added 3 price levels (W/O VAT) for each product (editable in BO).
Next, you should add three customer groups and if customer is in one of these groups, after login he has his prices displayed.
Works in product detail, products list, cart and order.
Do not remember to check product categories for group acces. (Someone may have products only for end users, not for dealers.)

Further info is in readme.txt
Not recommended for beginners, as changes in db and php files are needed. Tested and works in presta 1.3.0.1

Hope this helps.

Improvements, comments, questions, etc. are welcomed

Attached Files



edbloom

    PrestaShop Newbie

  • Members
  • Pip
  • 9 posts

Posted 03 February 2010 - 09:42 PM

hey there,

thanks for your contribution. I'm going to check this out asap as I think it does what I'm looking for. Perhaps you could clarify for me while I play with it.

I'd like to do the following

Group A
Product 1 $10
Product 2 $20
Product 3 $30

Group B
Product 1 $15
Product 2 $23
Product 3 $50

Is it also possible to hide a specific product from a specific group?

Thanks for your work!

prsut

    PrestaShop Apprentice

  • Members
  • PipPip
  • 65 posts

Posted 04 February 2010 - 07:32 AM

So, here ara some more details how it works after my changes.

I'm selling tennis strings. MSV and WeissCannon I sell for dealers, but Luxilon not - Luxilon is only for end users (EU). I have three dealer categories : Dealer D1 .. to .. Dealer D3. Dealer D3 has best prices. But for sets there are smaller discounts as for reels, and, for one set I can provide better discount as for other set. All in all, each product has four independant prices (one default for EU + three dealer prices). Note, before my changes, you can set customer group discount, but it is fixed for all products to which customer has access. It was not good for me.

Another task for me , that I have resolved : i want to use (as one of ) the same carrier (Slovak Post for example) for EU and for dealers BUT : For end user I have "Slovak Post" with price range definition (0-100 = 2,5EUR; 100-200 = 1EUR; 200 - more = free of charge), but for dealers I have "Slovak Post (D)" with price range definition (0-200EUR = 2.5EUR; 200 - more = free). Looks simple, but : because each customer is by default also in default category, when ordering (for example 150EUR total products), for dealers Slovak post with 1EUR and Slovak Post (D) with 2.5EUR shows, and this not the way I want it. For this I made changes in code and I'm using shipToPay module which works fine for me.

So please note:
-Dealer D1 has smaller discounts, Dealer D3 has best discounts.
-Each product has independant dealer prices
-because each customer is in default group, dealer still can (but access can be disabled) see products for EU (without need to fill dealer prices, because program simply takes basic price)

to edbloom :
in presta at all,
-each product can be enabled or disabled (groups have no effect)
-product category (where products resides) can have access to customer groups
-if you need to show/hide specific products for specific customer group, move such products to category and set group access (this is way how I deal with dealer's price list for download in pdf, for example...)
-carriers can have access to various customer groups (also zones...)
-you need enough time to discover all posibilities and set them properly...

Hope this help

skdev

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts

Posted 11 February 2010 - 02:28 PM

Thanks for providing us with a very helpfull and much needed wholeseller feature in prestashop.

We are using prestashop prestashop_1.2.5.0 latest stable release.

We have integrated php pages and also mysql table, still we are having problem with displaying proper price in both frontend and backend. In backend, if we edit any product, the final retail price shows okay, but without edit the price is visible as $0 in both frontend and backend.

Is it due to version of prestashop we are using?

prsut

    PrestaShop Apprentice

  • Members
  • PipPip
  • 65 posts

Posted 12 February 2010 - 07:24 AM

I'm sure it should work in presta 1.2.5. Just be sure how you name new customer groups. If not using "Dealer D1", you must edit php code. I know, it can be implemented way better, but I have had little time to implement it.
And, for other versions like 1.3.0.1, please use diff program (I'm using winmerge), to see, what is needed and new in code for wholesale support. Comments are in code for this.
I have tested in zend studio and it works. Sorry no module, I have no time, but I welcome if someone can put it into module.
Another notes : Dealer D3 has best prices...
When you have lot of products and price levels based of percentage discount (ie. Dealer D1 has 10%, Dealer D2 has 15% ..etc), for startyou can update prices in ps_product by sql statement via phpadmin (I'm using mysql query editor) by running "update ps_product set price_D1 = price / 1.1 , price_D2 = price / 1.15, ... and so. Backup table before trying.

skdev : if customer has acces to product with wholesale prices, that prices should be defined, or you can modify code slightly by addind fragment of code (for example if cust is in Dealer D1):

if ($price_D1 == 0)
{
price_D1 = price;
}
this is hint, not working code. I know about this, but for prducts with dealer access I have all prices defined.
Or use sql statement to update zero prices to base price...

L. Brett Sinclair

    PrestaShop Apprentice

  • Members
  • PipPip
  • 320 posts

Posted 12 February 2010 - 12:26 PM

how about the bug with customer group ? apparently, the group is not working
Tout sur la Country avec
www.Country-Cowboy.com

Blanchiment des dents avec
www.DentsDeStars.com
:cheese:

prsut

    PrestaShop Apprentice

  • Members
  • PipPip
  • 65 posts

Posted 12 February 2010 - 12:42 PM

I do not understand. What bug do you mean ? Please be more specific...

L. Brett Sinclair

    PrestaShop Apprentice

  • Members
  • PipPip
  • 320 posts

Posted 12 February 2010 - 12:52 PM

Here it is:
http://www.prestasho...groupes_clients

it says in the thread that it was confirmed as a bug, ...and the "magic answer" from the presta team was "install 1.3 Alpha".
Tout sur la Country avec
www.Country-Cowboy.com

Blanchiment des dents avec
www.DentsDeStars.com
:cheese:

prsut

    PrestaShop Apprentice

  • Members
  • PipPip
  • 65 posts

Posted 12 February 2010 - 01:00 PM

I'm not using paypal, so I dont know what about bug is. For me, customer groups works fine. Using 1.3.0.1 and almost daily updated from SVN...

And, I must add this note : (although is mentioned in zip from 1. post).

CUSTOMER GROUP DISCOUNTS ARE IGNORED IN MY IMPLEMENTATION. Can be enabled, but instead of this, each product has one base and three wholesale prices. Once more : group discounts and quantity discounts are ignored, but can be enabled.
Quantity discounts are only for end users. Dealers have prices based on dealer category (ie. customer group)...

distinct

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts

Posted 17 February 2010 - 07:14 AM

hi,

Great Mod... just curious is it possible to implement your mods into the product import? im sure it would be as easy as copying wholesale_prices in the import files but wanted to check with the forum to see if it has been done before

Thanks for all your help

mabrur

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts

Posted 22 February 2010 - 02:25 AM

I'm not using paypal, so I dont know what about bug is. For me, customer groups works fine. Using 1.3.0.1 and almost daily updated from SVN...

And, I must add this note : (although is mentioned in zip from 1. post).

CUSTOMER GROUP DISCOUNTS ARE IGNORED IN MY IMPLEMENTATION. Can be enabled, but instead of this, each product has one base and three wholesale prices. Once more : group discounts and quantity discounts are ignored, but can be enabled.
Quantity discounts are only for end users. Dealers have prices based on dealer category (ie. customer group)...




This is amazing module for wholesaler and retailer
But there is a problem while upload product.php in classes, my online store broken !
Please help me, Thank you.

distinct

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts

Posted 22 February 2010 - 02:28 AM

Hi Mabrur,

what version of PS are you using? also did you compare your files with WinMerge

mabrur

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts

Posted 22 February 2010 - 02:38 AM

Hi Mabrur,

what version of PS are you using? also did you compare your files with WinMerge



Hi distinct
I use Prestashop Version 1.2.5.0
I've compare with WinMerge too...

Is there the problem, the differences of version?

distinct

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts

Posted 22 February 2010 - 02:40 AM

yes, i have noticed there is a little difference do you have a link to show(PM me) i have a few min to help you

distinct

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts

Posted 22 February 2010 - 02:51 AM

did you also configure your customer groups to Dealer D1, Dealer D2 , Dealer D3

mabrur

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts

Posted 22 February 2010 - 02:55 AM

did you also configure your customer groups to Dealer D1, Dealer D2 , Dealer D3



Yes, I have made three categories of groups: Dealer D1, Dealer D2 , Dealer D3
But not add customers to group yet..

Thanks

prsut

    PrestaShop Apprentice

  • Members
  • PipPip
  • 65 posts

Posted 22 February 2010 - 06:17 AM

mabrur : product.php (note small letters) is not in classes folder, but in root folder of shop. Generally, in classes folder there are files like Product.php, Order.php...

mabrur

    PrestaShop Newbie

  • Members
  • Pip
  • 14 posts

Posted 22 February 2010 - 06:42 AM

mabrur : product.php (note small letters) is not in classes folder, but in root folder of shop. Generally, in classes folder there are files like Product.php, Order.php...



Hi prsut,
can you help me how to install your module: wholesale support.zip after download?
It's helpful for anyone who need this mod.
Thanks

nyett

    PrestaShop Apprentice

  • Members
  • PipPip
  • 105 posts

Posted 01 April 2010 - 06:21 PM

Hi prsut,

thank you for this great module,
I've implement this as you said in readme.txt
I can add product,add groups successfully.
but I had error when adding customer or edit customer data.

the error : validation function not found isDni

if I use the original file classes/Customer.php, I can add customer without any error,
but the price doesn't change..
then if I use your Customer.php file, I got that error..

please help me to figure out this error.. really need your help.
thank youuu

nyett.

robertjohn

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts

Posted 29 April 2010 - 10:01 AM

Great module - thank you.

On top of this functionality I am looking for my site to not charge VAT to a group member (in my case, for example, I am in UK and I would like to create a group for other trade european customers who are VAT registered as they would not be charged VAT).

Could this module do that with some tweaking?

RJ




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users