Welcome, Guest. Please login or register.
Login with username, password and session length


It's a release candidate! VirtueMart 2.0 RC - the next generation VirtueMart - is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: 1 [2]   Go Down
Print
Author Topic: Shopper Group Discount  (Read 10133 times)
metoshade
Newbie
*
Posts: 11


« Reply #15 on: April 01, 2009, 04:45:11 AM »

There is a way to get what you want:

Unregistered users browse the shop without discount, registered users get a x% discount (after they log in). Here is how I did it:

First: check the # of the shopper group you want users to register into by default. The -default- shopper group has #1. Remember that number.
Second: edit the file

administrator/components/com_virtuemart/classes/ps_shopper.php
and look for

$q .= "`default`='1' ";                 (line 410 or so)

Change that number into the number of the shopping group that you want users to register into by default. Now things should work like a charm.

I do not know if this is a proper fix or if this breaks other stuff. It seems harmless enough, but proceed at your own risk.
Logged

Joomla 1.5.10 // VM 1.1.3
dosneau
Newbie
*
Posts: 8


« Reply #16 on: April 27, 2009, 14:34:36 PM »

Why is it during default i have one pricing, however when i change the user to gold level, they recieve another pricing, where do I check that..thanks in advance
Logged
t0rit0
Newbie
*
Posts: 2



« Reply #17 on: May 08, 2009, 12:54:56 PM »

you can check it in products-> list products -> (select a product from the list sing the checkbox) -> list prices (at the top of the page), hope this can help you
Logged
NaGGi
Newbie
*
Posts: 31


« Reply #18 on: September 18, 2009, 01:24:38 AM »

@Metoshade

You sure that works? I tried it and it didnt do anything and if you look at the code it shouldnt do anything.

Don't know much about PHP but imo that line checks which row has default value set to 1 in vm_shopper_group database table and then takes the shopper_group_id from that row. Default is either 0 or 1 so changing that value to something else shouldnt do the job.

If you change the code in line 419 which is

Code:
$d['shopper_group_id'] = $db->f("shopper_group_id") ;

To the following

Code:
$d['shopper_group_id'] = 6 ;

It gives the Gold level shopper group to registered customer. You can see the numbers in database but default values are:

5 = -default-
6 = Golden level
7 = wholesale

No idea does this breaks something so try it at your own risk.
Logged
Lylene
Full Member
***
Posts: 118


« Reply #19 on: October 29, 2009, 11:56:58 AM »

Hey !

I have find out how to show original price with shopper group discounted prices ...

Insert following code :
Code:
else
// Shopper group DISCOUNT: Show old price!
if(!empty($price_info["product_base_price"])) {
?>
<span class="product-Old-Price">
<?php echo $CURRENCY_DISPLAY->getFullValue(($base_price) / ((100 $auth["shopper_group_discount"])/100)) ?></span>

<?php
}
?>
Plz Find the file below ...



BUT, there is a but : it does not work when a specific discount is applied on products ... it refers the known bug described by scar about product discounts on top of shopper group discounts !!!

To clear it out, i'd like to make this rule :
--> product discount has the priority on shopper group discount : both can't work together.
After some thinking, it seems to be the easiest way to solve this thing. As shopper discount usually is lower than product discount, that would be ok for me anyway ...

* price.tpl.txt (1.19 KB - downloaded 233 times.)
« Last Edit: October 29, 2009, 11:59:33 AM by Lylene » Logged
Lylene
Full Member
***
Posts: 118


« Reply #20 on: November 01, 2009, 07:21:59 AM »

hey there Smiley
Logged
renaud3712
Newbie
*
Posts: 4


« Reply #21 on: December 17, 2009, 10:38:47 AM »

Hello Lylene
excuse my english /I am french....
your price.tpl.php works nice with me
but when I send by module sendcart copy to a friend of cart
prices in email are real full prices without shoppers discounts
Can you help me ?
thanks Renaud3712
Logged
renaud3712
Newbie
*
Posts: 4


« Reply #22 on: December 18, 2009, 03:12:19 AM »

 Excuse me
I forgot to add module sendcart
it's attached here =
http://forum.joomla.fr/showthread.php?t=110484

renaud3712
Logged
mwf
Jr. Member
**
Posts: 82


Ready to Code!


WWW
« Reply #23 on: December 21, 2009, 09:49:31 AM »

Maybe I don't understand the design here, but my thinking is the Shopper Group discounting would be something you would use to differentiate customers. Example, B2B get one price level and B2C gets another. From what I've tested this seems to be the scenario supported - and it works that way. To me the current functionality for this is fine.

Coupon discounts is something the the shop uses for promotions, typically in B2C.
Logged

Professional VirtueMart Support
http://www.exps.ca
kunalvm
Newbie
*
Posts: 10


« Reply #24 on: July 29, 2010, 01:13:29 AM »


If you change the code in line 419 which is

Code:
$d['shopper_group_id'] = $db->f("shopper_group_id") ;

To the following

Code:
$d['shopper_group_id'] = 6 ;


works as it should..and new users get added to golden level shoppers group automatically..thanx..Smiley
Logged
Pages: 1 [2]   Go Up
Print
Jump to: