News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Creating payment module

Started by malaikax, April 10, 2010, 05:30:33 AM

Previous topic - Next topic

malaikax

hello all,
I want to ask for the variable product name, product price, product quantity and subtotals for use in payment module.

I use a payment gateway opals from Brunei, and they provide the configuration of their value to the payment gateway, one of which is a basket containing 4 values like this.

ITEM   UPRICE   QTY   STOTAL
Palm Vx   600.00   1   600.00
Palm V   400.00   1   400.00

how to set it in VirtueMart, I need help, I've tried in many ways but always failed

coderxo

      $q  = "SELECT * FROM #__vm_order_item WHERE order_id='$order_id'";
       $dbbt = new ps_DB;
         $dbbt->setQuery($q);
         $dbbt->query();
         $i = 1;
         $formvars = array();
      while( $dbbt->next_record()   )
         {   
             $name = $dbbt->f("order_item_name");
               $price = number_format($dbbt->f("product_item_price"),2,'.','');
               $quantity = $dbbt->f("product_quantity");
               
                  }
-
Let every thought and every word be a prayer
----
http://www.coderxo.com

rwcorbett

Quote from: coderxo on April 18, 2010, 23:34:59 PM
      $q  = "SELECT * FROM #__vm_order_item WHERE order_id='$order_id'";
       $dbbt = new ps_DB;
         $dbbt->setQuery($q);
         $dbbt->query();
         $i = 1;
         $formvars = array();
      while( $dbbt->next_record()   )
         {   
             $name = $dbbt->f("order_item_name");
               $price = number_format($dbbt->f("product_item_price"),2,'.','');
               $quantity = $dbbt->f("product_quantity");
               
                  }
like he said - and the STOTAL looks like a subtotal maybe? that var is
$dbbt->f("order_subtotal")

coderxo

Maybe you should read his post and see what STOTAL is.

From the above posted code, you have the item price, and quantity.

STOTAL for each item is: $price * $quantity


-
Let every thought and every word be a prayer
----
http://www.coderxo.com