Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Display Group name to Customer in Menu

Display Group name to Customer in Menu

Locked

Views: 1,915

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
21 Apr 2009, 6:10 AM
#1
avf avatar

avf

New Zenner

Join Date:
May 2008
Posts:
87
Plugin Contributions:
0

Display Group name to Customer in Menu

I like the group pricing mod and want to enable that on my site.
Here are 2 thoughts i have , if anyone has got that working it would be great for me to incorporate in the site.

  1. First simply enough I want the customer to see in the title or in the menubar where there is "my account" what group is he a part of. So it should simply say something like "Group A"

  2. I would like to display both the Regular price and the Group pricing at the product info page with the Regular price struck off with maybe the %age discount or discounted amount displayed there too

If anyone has included these it would be great to hear from you
Thanks

21 Apr 2009, 6:29 AM
#2
avf avatar

avf

New Zenner

Join Date:
May 2008
Posts:
87
Plugin Contributions:
0

Re: Display Group name to Customer in Menu

Just to add this is for the mod

Group Price Per Item

21 Apr 2009, 8:25 PM
#3
avf avatar

avf

New Zenner

Join Date:
May 2008
Posts:
87
Plugin Contributions:
0

Re: Display Group name to Customer in Menu

Anyone Please ?
Linda any magic here too ? :D

23 Apr 2009, 5:51 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Display Group name to Customer in Menu

I have not used the: Group Price Per Item

Perhaps someone who has could jump in here with some suggestions ... :smile:

24 Apr 2009, 4:31 AM
#5
avf avatar

avf

New Zenner

Join Date:
May 2008
Posts:
87
Plugin Contributions:
0

Re: Display Group name to Customer in Menu

Do we have anyone from the programmers who did the mod who could help please
Thanks
AVF

2 May 2009, 7:51 PM
#6
avf avatar

avf

New Zenner

Join Date:
May 2008
Posts:
87
Plugin Contributions:
0

Re: Display Group name to Customer in Menu

Hello Linda, Can you take some time to look into this mod and help. It would be really appreciated :cool:
Thanks

3 May 2009, 6:20 AM
#7
avf avatar

avf

New Zenner

Join Date:
May 2008
Posts:
87
Plugin Contributions:
0

Re: Display Group name to Customer in Menu

I got help from TheOracle and this is what was needed to display the group name in the top menu bar.

Now, if you'd like to display the group name right aside the 'My account' link, this is what you need to do.

// Step 1

In your includes/functions/extra_functions folder, create a new file named: group_pricing_functions.php .

Inside, paste the following content:

<?php if (!function_exists('show_group_pricing_name')) { function show_group_pricing_name($customers_id) { global $db; if ($customers_id <= 0) { return false; } else { $customer_group_query = "select gp.group_name from " . TABLE_CUSTOMERS . " cu left join " . TABLE_GROUP_PRICING . " gp on cu.customers_group_pricing = gp.group_id where cu.customers_id = " . (int)$customers_id; if ($customer_group = $db->Execute($customer_group_query)) { return zen_output_string_protected($customer_group->fields['group_name']); } } } } ?>

// Step 2

In includes/templates/<your_template>/tpl_header.php file,

find:

<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>

add right below:

<li><?php echo show_group_pricing_name($_SESSION['customer_id']); ?></li>

This should show the group name relatively right aside the 'My Account' link once the customer has logged in into his account.

THis works

Thanks to Oracle for the support

Now if we can display both the Actual and group pricing on the product page it would be an awesome Mod.