News:

Looking for documentation? Take a look on our wiki

Main Menu

Admin: Shopper Groups on Product Page (halfway there...)

Started by wastubbs, June 05, 2013, 20:49:19 PM

Previous topic - Next topic

wastubbs

Hi all,


To make things easier for my store administrator to manage, I've added a table column to the Product view in the administrator Virtuemart Component, and thought I would share.

QuoteNOTICE:

This involves editing a Vituemart core component, do so at your own risk!

Right around line 178, you come to the last <td></td>, which is for the product's ID. I added another table column and put this inside;

<?php $groups $product->shoppergroups;
if (is_array($groups))
foreach($groups as $val) {
  print $val " ";
}
?>



The results are that I get the ID of each Shopper Group, but not the name. If anyone knows which function(s) can be called on this page that include the shopper_group_name, please let me know and I'll take a crack at having this hack display the friendly shopper group names instead of the ID #

It might go without saying, but don't forget to add another <th></th> to your <thead> group so that you get a nice header as well.