- Posts: 52
- Thank you received: 0
special pricing
- dontflinch
-
Topic Author
- Offline
I think what I may need is for my group to not be under "public" tree in usergroup management, but don't know how to do that.
if I don't have a public price it just says FREE. so I need a public price but then also a (lower) coop price. I have checked the config display setting "Price display method cheapest price" and yet it still shows both the public price and the coop price to coop member. I have tried moving the group around but can't seem to get it from under the public.
any suggestions?
Please Log in or Create an account to join the conversation.
Your settings in HikaShop sound fine. The problem is really to have the user only in the coop group and not in the public group. How do you change that actually ? I suppose you must use DJF ACL ? Or maybe you're on joomla 1.6 ?
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
I am sure you can understand it will be confusing for coop users to see just two prices listed with no explanation.
this is what it looks like now:
Product Name
XJF-7870
$27.80 each
$23.75 each
why is the "show cheapest price" setting not changing that and only showing them the cheapest price for them?
is there some other edit I can make?
if this isn't able to be set to do this now, maybe in future it could be that each group price have/append the group-name to the css class then I could just display: none the other?
edit: well maybe display: none wouldn't work but I could make the group css a bolder color or something.
Please Log in or Create an account to join the conversation.
The show cheapest price is for the listing not for the product page.
You should edit the user and remove it from the "public" group via the user manager. Then, he will only see the price for the other group.
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
my guess is because all groups are children of public.
I am going to try to write a php hack for this in the next day or two and maybe I can run it by you since I know a little php but am not really skilled in it. I also don't know what all the standard joomla calls are like for the user id (probably user_id?).
basically I'm just gonna make a little
if {user_id=="coopid#" && user_id!=="publicid#"} echo $public_price;
else echo $coop_price;
but that's just off the top of my head, I'll have to get out my books and look at the right formatting etc.
Please Log in or Create an account to join the conversation.
$user =& JFactory::getUser();
if($user->id != 62) array_shift($this->row->prices); //supposing that 62 is the id of your coop user
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0

p.s. while looking I realize I framed this hack in regard to a particular user, is there a way to do it for a user GROUP?
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
Please Log in or Create an account to join the conversation.
On joomla 1.5, the group id is in $user->gid:
if($user->gid != 62) array_shift($this->row->prices);
For 1.6, it's more complicated as you will get an array of groups:
$userGroups = JAccess::getGroupsByUser($user->id, true);
$inter = array_intersect($userGroups,array(29));//if group 29 is for coop
if(empty($inter)) array_shift($this->row->prices);
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
I added it right at the beginning after:
and before the foreach$first=true;
echo JText::_('PRICE_BEGINNING');
am I not putting it in the right place?
I feel like maybe I need to make that statement an if and have the else be
$userGroups = JAccess::getGroupsByUser($user->id, true);
$inter = array_intersect($userGroups,array(1)); // where 1 is public group
with no array shift? but I keep breaking it and losing the add to cart block.
I REALLY appreciate the help on this. my customer brought this issue up to me again today so I really want to get it right if at all possible (and anything is possible if one knows php well enough? :blink: )
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
p.s. I want to be sure you know I was trying to be funny, as I am aware I obviously do not.....(and anything is possible if one knows php well enough? :blink: )
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- dontflinch
-
Topic Author
- Offline
- Posts: 52
- Thank you received: 0
I edited the user group options to set the guest group to "customer" and had to move the special group back under registered. but now it seems to work as my customer wanted.
now I just have to manually edit almost 700 products public price to "customer" group, lol.
thank you again for your help - you guys are really fantastic!
Please Log in or Create an account to join the conversation.