Guest User

Untitled

a guest
Feb 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.28 KB | None | 0 0
  1. $q = "SELECT product_price, price_quantity_start, price_quantity_end, product_currency FROM #__{vm}_product_price
  2.                             WHERE product_id='$product_id' AND shopper_group_id='".$default_shopper_group_id."' ORDER BY price_quantity_start";
  3.                         $db->query( $q );
  4.                         while( $db->next_record() ) {
  5.                             $prices_table .= "<tr class=\"sectiontableentry$i\"><td>".$db->f("price_quantity_start")." - ".$db->f("price_quantity_end")."</td>";
  6.                             $prices_table .= "<td>";
  7.                             if (!empty($my_taxrate))
  8.                                 $prices_table .= $CURRENCY_DISPLAY->getFullValue( ($my_taxrate+1)*$db->f("product_price")*((100-$shopper_group_discount)/100) );
  9.                             else
  10.                                 $prices_table .= $CURRENCY_DISPLAY->getFullValue( $db->f("product_price")*((100-$shopper_group_discount)/100) );
  11.                             $prices_table .= "</td></tr>";
  12.                             $i == 1 ? $i++ : $i--;
  13.  
  14. ---------------------------------------------------------------------------------------------
  15. if (!empty($my_taxrate)) ez utáni rész kiír egy bruttó összeget, ha nincs beállítva tax, az else rész pedig ha van tax, akkor a nettó összeget írja ki.
  16.  
  17. nekem csak annyi kellene, az else utáni rész is meg kellene jelenítenem az if-es rész után.
  18.  
  19.  
  20. Tehát kiírja a Bruttót és utána a nettót. Nem tudom érthetően vázoltam fel a dolgokat.
Add Comment
Please, Sign In to add comment