Shopergroup - extending funcionality

Hello to all,

I am kind of newbie and need a bit help around this piece of code:

  1. Putting piece of code into table
  2. adding new filed

This is the code:
[php] <?php // no direct access

*/

defined( 'JEXEC’ ) or die( ‘Restricted access’ );
JHTML::
(‘behavior.mootools’); ?>

<?php //echo $hello; $db =& JFactory::getDBO(); $product_id=$_REQUEST['product_id']; $row_aa=mysql_query("select * from jos_shoppergroup order by id desc limit 0,1"); $result_aa=mysql_fetch_array($row_aa); $group=$result_aa["shoppergroup"]; if(!empty($product_id)) { $query2 =mysql_query("SELECT * FROM `jos_vm_shopper_group` WHERE `default` = '1'"); $result2=mysql_fetch_array($query2); $usergroup=$result2['shopper_group_name']; $urlgroup=$result2['shopper_group_maloprodaja_url']; $phonegroup=$result2['shopper_group_phone']; $user =& JFactory::getUser(); $userid=$user->get('id'); if($userid>0) { $query2 =mysql_query("SELECT * FROM `jos_vm_shopper_vendor_xref` WHERE user_id = '$userid'"); $result2=mysql_fetch_array($query2); $shopper_group_id=$result2['shopper_group_id']; $query2 =mysql_query("SELECT * FROM `jos_vm_shopper_group` WHERE shopper_group_id = '$shopper_group_id'"); $result2=mysql_fetch_array($query2); $shopper_group_name=$result2['shopper_group_name']; echo "Cene maloprodaja".''.$shopper_group_name.''."
"; } $query1 ="select * from jos_vm_shopper_group ORDER BY shopper_group_id asc"; $result1 = mysql_query($query1) or die(mysql_error()); while ($row1 =mysql_fetch_array($result1)) { $shopper_group_id=$row1["shopper_group_id"]; $bb=strpos($group,$row1['shopper_group_name']); $url=$row1['shopper_group_maloprodaja_url']; $phone=$row1['shopper_group_phone']; if(is_numeric($bb)) { $row_a=mysql_query("select * from jos_vm_product_price where shopper_group_id='$shopper_group_id' and product_id=$product_id"); $result_a=mysql_fetch_array($row_a); if ($result_a["product_price"] !=0) { //echo "select * from jos_vm_product_price where shopper_group_id='$shopper_group_id' and product_id=$product_id"; echo "".$row1['shopper_group_name']." ► Tel: ".$row1['shopper_group_phone']." ► Cena: ".number_format($result_a["product_price"],0,'.',',')." RSD
"; } } } } /* if(!empty($product_id)) */ //} else echo ""; //echo $date; ?>[/php]

There is this piece of code:
[php]if ($result_a[“product_price”] !=0) {
//echo “select * from jos_vm_product_price where shopper_group_id=’$shopper_group_id’ and product_id=$product_id”;
echo “<a href=’”.$row1[‘shopper_group_maloprodaja_url’]."’ >".$row1[‘shopper_group_name’]." ► Tel: “.$row1[‘shopper_group_phone’].” ► Cena: “.number_format($result_a[“product_price”],0,’.’,’,’).” RSD
";
[/php]
That i would like to put in nice looking table with headers: Name, Phone, Price.

Other part is possibility of adding one more field “URl to product” into existing code.

If any additional info needed please ask.

Anybody?

It might help to ask on the Shopergroup forums. Your question is quite odd and requires knowledge of an obscure third party product that I don’t think anyone of this forum has experience of.

Thank you for your answer. This is actual just a part of third party product that i managed to modify to the certain point. Only ting left is too put few lines in nice looking table. So i tote that this is the right place for learning and getting some help…

Sponsor our Newsletter | Privacy Policy | Terms of Service