VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Payment VM 1.1 => PayPal / PayPal Pro VM 1.1 => Topic started by: pandorra on September 24, 2008, 21:20:51 PM

Title: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: pandorra on September 24, 2008, 21:20:51 PM
here is the code from PayPal extra Info...

"item_name" => $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER').": ". $db->f("order_id"),

what must be written here to show not the Order ID, but the Name of Product...

Thanks in advance...
Title: Re: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: guimplenchik on October 03, 2008, 19:37:59 PM
I did in this way. Back up first!!
after lines:

<?php
$db1 = new ps_DB();
$q = "SELECT country_2_code FROM #__vm_country WHERE country_3_code='".$user->country."' ORDER BY country_2_code ASC";
$db1->query($q);

add the following:

$dbcart = new ps_DB;
$z = "SELECT order_item_name FROM `#__vm_order_item`
                WHERE order_item_id='".$db->f("order_id")."'";

      $dbcart->query($z);

and instead of:


"item_name" => $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER').": ". $db->f("order_id"),

add this:

"item_name" => $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER').": ". $db->f("order_id"). " - ". $dbcart->f("order_item_name"),

or u can change the red one to ". $dbcart->f("order_item_sku"), if u want to display SKU

Hope this will help
Title: Re: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: pandorra on October 05, 2008, 23:20:36 PM
This new code doesn't work...
Title: Re: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: evilryu530 on October 14, 2008, 03:34:08 AM
yes it does, do it right and u will have no problem pandorra. i just did it and it worked fine.
Title: Re: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: pjpendleton on October 19, 2008, 14:44:03 PM
I assume the comma changes to a period after:
"item_name" => $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER').": ". $db->f("order_id"),
????
Title: Re: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: pjpendleton on October 19, 2008, 16:24:22 PM
OK... I've tried this and cannot get it to work.

Notice the image below after the fix -


(http://constructionofficeonline.com/images/paypal_order_no_fix.jpg)

[attachment cleanup by admin]
Title: Re: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: pravin_bluebird on November 06, 2008, 12:41:50 PM
hey but what if there are more products in cart?.....
Title: Re: How to make the PayPal to view "Item Name", but not "Order ID"???
Post by: kontrolfreek on December 20, 2008, 01:07:51 AM
your screwed with more then one part, that is my issue, there has got to be a way to do this so it list out all the products you bought in the paypal form, surely