How do you display products on Paypal checkout / Front end currency selection

20.01.2013 16:08
#1
jjones
Joomshopping forum user no avatar
Name: Jimmy Jones
11.01.2013
Posts: 25
Quote
How do you display products on Paypal checkout / Front end currency selection

First of all, congratulations on a great product. I've tested 5 top shopping carts available on the internet and none of them can do what Joomshopping can do, and it's very simple. To be able to apply a shipping cost per product. It sounds simple but they do not seem to be able to do it, so well done Joomshopping...

I am currently testing Joomshopping at the moment and it's passing with flying colours but I have two queries?

1) How do you get Joomshopping to display the products in the Paypal checkout rather than just the order number?

2) Is there a way that customers can change the currently in the frontend?

Thanks and keep up the good work!

Jimmy


Joomla: 2.5.8
JoomShopping: Version 3.12.3
PHP: 5.2
MySQL: 5
Website Url: On request
 
20.01.2013 16:29
#2
jjones
Joomshopping forum user no avatar
Name: Jimmy Jones
11.01.2013
Posts: 25
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection

Hi,

I sorted the frontend currency option. I downloaded the free currency selector
on your site and installed it, works great!

I just need to find out about the product display in Paypal.

A great product, well done!

Jimmy


Joomla: 2.5.8
JoomShopping: Version 3.12.3
PHP: 5.2
MySQL: 5
Website Url: On request
 
20.01.2013 18:26
#3
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25853
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection

Not possible.

need change payment system
components\com_jshopping\payments\pm_paypal\pm_paypal.php

 
24.01.2013 17:14
#4
jjones
Joomshopping forum user no avatar
Name: Jimmy Jones
11.01.2013
Posts: 25
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection

Hi,

Thanks for your reply.

I currently us Paypal on an old site with the Paypal code embedded in the site for purchasing products. When users purchase a product off the site, the product displays in Paypal.

Is there no way the code can be altered to do this? Here is sample copy of the code used which shows the item purchased on Papal.

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<div style="text-align: center;"></div>
<input name="add" value="1" size="3" maxlength="3" type="hidden" />
<div style="text-align: center;"><span style="font-size: 10pt; font-family: verdana,geneva;"><strong>Shipping Cost</strong></span> <input name="cmd" value="_cart" type="hidden" /> <input name="business" value="Shop@shop.com" type="hidden" /> <input name="item_name" value="Red Pens" type="hidden" /> <input name="amount" value="9.94" type="hidden" /> <select name="shipping" size="1"> <option>10.00</option> <option>15.00</option> <option>0.00</option> </select> <br /> <br /> <input name="page_style" value="PayPal" type="hidden" /> <input name="no_shipping" value="2" type="hidden" /> <input name="currency_code" value="EUR" type="hidden" /> <input name="lc" value="IE" type="hidden" /> <input name="bn" value="PP-ShopCartBF" type="hidden" /> <input src="https://www.paypal.com//en_US/i/btn/sc-but-03.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" border="0" type="image" /> <img src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" height="1" width="1" /></div>
</form>

Can some of this code be incorporated into the Joomshopping Paypal code?

regards

 
05.02.2013 11:24
#5
cubixt
Joomshopping forum user no avatar
Name: cubixt
05.02.2013
Posts: 1
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection

Hi,

I changed
components\com_jshopping\payments\pm_paypal\pm_paypal.php


to

<input type='hidden' name='amount' value='<?php print $order->order_subtotal?>'>
<input type='hidden' name='shipping' value='<?php print $order->order_shipping?>'>

You will get the price of all products + the costs of shipping. I am not very happy with this solution but I think it's the only option.

// Or is there any possibility to change pm_payl.php that product name, product price and quantity of each cart item will be transferred to paypal.

It would be nice if joomshopping use the api to send the whole cart to paypal. I think the shop might look more reliable because customers could check whether the cart is transferred correctly.


Last change: 05.02.2013 13:54
 
27.05.2016 19:56
#6
Blinkster
Joomshopping forum user no avatar
Name: Blink
08.04.2016
Posts: 4
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection

Has ANYONE figured out how to make this cart pass the product information and variables to Paypal? This seems like a standard process for every shopping cart and it doesn't make sense that this cart doesn't do this?

 
09.06.2016 04:12
#7
Bilmar
Joomshopping forum user no avatar
Name: Mark
23.05.2016
Posts: 124
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection

I am having the same issue with this as well? Any success in getting a solution?

 
11.06.2016 03:24
#8
Bilmar
Joomshopping forum user no avatar
Name: Mark
23.05.2016
Posts: 124
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection

I am hoping you can give me some direction to help edit the core Paypal payment extension to send the product data and attributes to Paypal.

If I use a hybrid of programming to get the data and attributes like this:

function _addProductToForm($product, $product_item){
if (isset($product->product_attributes) && $product->product_attributes!=''){
$desc = trim($product->product_name."\n".$product->product_attributes);
}else{
$desc = trim($product->product_name);
}
$name = $product->product_name;
if ($this->productNameWithAttributs){
$name = $desc;
}
return '&L_PAYMENTREQUEST_0_NAME'.$product_item.'='.urlencode($name).
'&L_PAYMENTREQUEST_0_NUMBER'.$product_item.'='.urlencode($product->product_ean).
'&L_PAYMENTREQUEST_0_DESC'.$product_item.'='.urlencode($desc).
'&L_PAYMENTREQUEST_0_AMT'.$product_item.'='.round($product->product_item_price, 2).
'&L_PAYMENTREQUEST_0_QTY'.$product_item.'='.$product->product_quantity;
}


How can I then use that data to insert it into the Paypal form to submit it to Paypal like this:

<?php $items = unserialize($_SESSION['items']); ?>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="business" value="email@yahoo.ca">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="return" value="http://www.mysite.com/">

<?php
$suffix = 1;
foreach($items as $item):
?>
<input type="hidden" name="item_name_<?php echo $suffix; ?>" value="<?php echo $item['name']; ?>">

<?php
$suffix++;
endforeach;
?>

<input type="submit" name="paypal" id="paypal" value="Checkout" />
</form>

What I need to know is what to do to get the function to insert the product name and attributes into this script?

What should this line read: <?php $items = unserialize($_SESSION['items']); ?>

And then what should this line read to insert them into the script: <input type="hidden" name="item_name_<?php echo $suffix; ?>" value="<?php echo $item['name']; ?>">

Maybe collectively we can figure this out and help each other to get this solved.

 
15.06.2016 03:32
#9
Bilmar
Joomshopping forum user no avatar
Name: Mark
23.05.2016
Posts: 124
Quote
Aw: How do you display products on Paypal checkout / Front end currency selection


function _addProductToForm($product, $product_item){
if (isset($product->product_attributes) && $product->product_attributes!=''){
$desc = trim($product->product_name."\n".$product->product_attributes);
}else{
$desc = trim($product->product_name);
}
$name = $product->product_name;
if ($this->productNameWithAttributs){
$name = $desc;
}
return '&L_PAYMENTREQUEST_0_NAME'.$product_item.'='.urlencode($name).
'&L_PAYMENTREQUEST_0_NUMBER'.$product_item.'='.urlencode($product->product_ean).
'&L_PAYMENTREQUEST_0_DESC'.$product_item.'='.urlencode($desc).
'&L_PAYMENTREQUEST_0_AMT'.$product_item.'='.round($product->product_item_price, 2).
'&L_PAYMENTREQUEST_0_QTY'.$product_item.'='.$product->product_quantity;
}



How can I use that data to insert it into the Paypal form to submit it to Paypal like this:

What Does This Line Need To Read:
<?php $items = unserialize($_SESSION['items']); ?>


<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="business" value="email@yahoo.ca">
<input type="hidden" name="currency_code" value="CAD">
<input type="hidden" name="return" value="http://www.mysite.com/">

Then these lines should allow us to get each item from the cart:
<?php
$suffix = 1;
foreach($items as $item):
?>
<input type="hidden" name="item_name_<?php echo $suffix; ?>" value="<?php echo $item['name']; ?>">

<?php
$suffix++;
endforeach;
?>


<input type="submit" name="paypal" id="paypal" value="Checkout" />
</form>

What I need to know is what to do to get the function to insert the product name and attributes into this script?

What should this line read:
<?php $items = unserialize($_SESSION['items']); ?>


And then what should this line read to insert them into the script:
<input type="hidden" name="item_name_<?php echo $suffix; ?>" value="<?php echo $item['name']; ?>">


Any ideas?


Last change: 15.06.2016 03:38
 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.