Webshop Plus! v.3.2 for WWB8

This forum is dedicated to discussions about shopping carts/ecommerce.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
User avatar
Navaldesign
 
 
Posts: 1003
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Navaldesign » Thu Jan 12, 2012 9:25 pm

Code: Select all

<?php 

################################################################################### 
// PAYSON parametrar 

// AgentID - found under the "My Account / Integration" when you are logged in 
$AgentID = '1234'; 

// MD5-key - found under the "My Account / Integration" when you are logged in
$Key= '1234abcd-1234-abcd-abc-987654321abcd'; 

// A description of what the order relates to, is shown in the customer's account history  
$Description = $dbts_title.' Order '.$orderid; 

// Store or the site's email address NOTE! Must be the same as your Payson Account
$SellerEmail =    'order@dinwebbplats.se'; 

// The total of your order, from your order form
$payson_totalsumma = $_SESSION['nettotal']; 

// Buyer's e-mail, from your order form 
$BuyerEmail    = $_SESSION['email']; 

// Grand total from the parameters above 
$Cost =    $payson_totalsumma; 
// Grand total when you test your Payson-payment
//$Cost =    '5,00'; 

// Additional costs such as shipping 
$ExtraCost = $_SESSION['shipping1'] + $_SESSION['handling'];  

// The confirmation page that appears when Payson-payment has been made
$OkUrl = 'http://dinwebbplats.se/payson_betalning/payson_betalning_klar.php'; 

// Error-page that appears on the Payson-payment is interrupted (you need not normaly enter anything here)
$CancelUrl = 'http://dinwebbplats.se/payson_betalning/error.php'; 

// Reference can be customer id, or anything that identifies the payment
// If you do not specify anything here, you can use the customer's email address $BuyerEmail to identify the payment 
$RefNr = $orderid; 

// Enter 1 for not offering Payson warranty or two to offer Payson Guarantee
// Learn more about this Paysongarantin: http://www.payson.se/About/Guarantee/  
$GuaranteeOffered = "1"; 

// MD5-hash calculated from the parameters above
$MD5string = $SellerEmail . ":" . $Cost . ":" . $ExtraCost . ":" . $OkUrl . ":" . $GuaranteeOffered . $Key; 
$MD5Hash = md5($MD5string); 




################################################################################### 
// PAYSON formulär 
// TEST 
// <form action="https://www.payson.se/testagent/default.aspx" method="post"> 
echo' 
<form action="https://www.payson.se/merchant/default.aspx" method="post"> 
<input type="hidden" name="BuyerEmail" value="'.$BuyerEmail.'" /> 
<input type="hidden" name="AgentID" value="'.$AgentID.'" /> 
<input type="hidden" name="Description" value="'.$Description.'" /> 
<input type="hidden" name="SellerEmail" value="'.$SellerEmail.'" /> 
<input type="hidden" name="Cost" value="'.$Cost.'" /> 
<input type="hidden" name="ExtraCost" value="'.$ExtraCost.'" /> 
<input type="hidden" name="OkUrl" value="'.$OkUrl.'" /> 
<input type="hidden" name="CancelUrl" value="'.$CancelUrl.'" /> 
<input type="hidden" name="RefNr" value="'.$RefNr.'" /> 
<input type="hidden" name="MD5" value="'.$MD5Hash.'" /> 
<input type="hidden" name="GuaranteeOffered" value="'.$GuaranteeOffered.'" /> 
<input type="submit" value="Klicka h&auml;r f&ouml;r att betala!" /> 
<br /><br /> 
<img src="payson_logo/payson145x42.png" alt="Betala med Payson" /> 
</form> 
'; 
################################################################################### 

?> 

But you will probably need to also convert amounts to the 100,00 format (Paypal uses . instead of ,)
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Thu Jan 12, 2012 9:41 pm

Navaldesign wrote:

Code: Select all

<?php 

OK Thank's i'l try this. How to put a a Payson option in the combobox in checkout.php page (the combobox whare the Paypal payment option is) The best would be if i could just add the Payson code/Button in the same page as the Paypal code/Button. Do i just chnage the Combobox Pypal option to ex, Paypal / Payson and then add the Payson code in a second html box in the thankyou.php page?

################################################################################### 
// PAYSON parametrar 

// AgentID - found under the "My Account / Integration" when you are logged in 
$AgentID = '1234'; 

// MD5-key - found under the "My Account / Integration" when you are logged in
$Key= '1234abcd-1234-abcd-abc-987654321abcd'; 

// A description of what the order relates to, is shown in the customer's account history  
$Description = $dbts_title.' Order '.$orderid; 

// Store or the site's email address NOTE! Must be the same as your Payson Account
$SellerEmail =    'order@dinwebbplats.se'; 

// The total of your order, from your order form
$payson_totalsumma = $_SESSION['nettotal']; 

// Buyer's e-mail, from your order form 
$BuyerEmail    = $_SESSION['email']; 

// Grand total from the parameters above 
$Cost =    $payson_totalsumma; 
// Grand total when you test your Payson-payment
//$Cost =    '5,00'; 

// Additional costs such as shipping 
$ExtraCost = $_SESSION['shipping1'] + $_SESSION['handling'];  

// The confirmation page that appears when Payson-payment has been made
$OkUrl = 'http://dinwebbplats.se/payson_betalning/payson_betalning_klar.php'; 

// Error-page that appears on the Payson-payment is interrupted (you need not normaly enter anything here)
$CancelUrl = 'http://dinwebbplats.se/payson_betalning/error.php'; 

// Reference can be customer id, or anything that identifies the payment
// If you do not specify anything here, you can use the customer's email address $BuyerEmail to identify the payment 
$RefNr = $orderid; 

// Enter 1 for not offering Payson warranty or two to offer Payson Guarantee
// Learn more about this Paysongarantin: http://www.payson.se/About/Guarantee/  
$GuaranteeOffered = "1"; 

// MD5-hash calculated from the parameters above
$MD5string = $SellerEmail . ":" . $Cost . ":" . $ExtraCost . ":" . $OkUrl . ":" . $GuaranteeOffered . $Key; 
$MD5Hash = md5($MD5string); 




################################################################################### 
// PAYSON formulär 
// TEST 
// <form action="https://www.payson.se/testagent/default.aspx" method="post"> 
echo' 
<form action="https://www.payson.se/merchant/default.aspx" method="post"> 
<input type="hidden" name="BuyerEmail" value="'.$BuyerEmail.'" /> 
<input type="hidden" name="AgentID" value="'.$AgentID.'" /> 
<input type="hidden" name="Description" value="'.$Description.'" /> 
<input type="hidden" name="SellerEmail" value="'.$SellerEmail.'" /> 
<input type="hidden" name="Cost" value="'.$Cost.'" /> 
<input type="hidden" name="ExtraCost" value="'.$ExtraCost.'" /> 
<input type="hidden" name="OkUrl" value="'.$OkUrl.'" /> 
<input type="hidden" name="CancelUrl" value="'.$CancelUrl.'" /> 
<input type="hidden" name="RefNr" value="'.$RefNr.'" /> 
<input type="hidden" name="MD5" value="'.$MD5Hash.'" /> 
<input type="hidden" name="GuaranteeOffered" value="'.$GuaranteeOffered.'" /> 
<input type="submit" value="Klicka h&auml;r f&ouml;r att betala!" /> 
<br /><br /> 
<img src="payson_logo/payson145x42.png" alt="Betala med Payson" /> 
</form> 
'; 
################################################################################### 

?> 

But you will probably need to also convert amounts to the 100,00 format (Paypal uses . instead of ,)

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Thu Jan 12, 2012 10:24 pm

OK i got it working now. I made a thankyou2.php page and put the Payson code in it incl, this befor the form: if ($_SESSION['paymenttype'] == "Payson")
{
$form = '
and this after: echo $form;

and it worked, but i dident get redirected to thankyou2.php page i still come to thankyou.php page and no button at all.

So i put the Payson code in the thankyou.php page as well as the Paypal code. Now if i choos Payson as payment type i get the Payson payment button, but the Paypal button dont show

I would like for bouth the payment buttons to be there or if i can get it to work so that i get redirected to thankyou2.php page for the Payson option?

User avatar
Navaldesign
 
 
Posts: 1003
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Navaldesign » Thu Jan 12, 2012 10:39 pm

You can't redirect to any other page than "thankyou"

If you want both, just remove the if statement (leaving in place the part that is between the { and }

if(....) Remove this line
{ Remove this line
........
........
........
........
} Remove this line
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Thu Jan 12, 2012 10:57 pm

Navaldesign wrote:You can't redirect to any other page than "thankyou"

If you want both, just remove the if statement (leaving in place the part that is between the { and }

if(....) Remove this line
{ Remove this line
........
........
........
........
} Remove this line
OK. I'l try that. Thank you for your help. I'v been trying to implement this for a long time. So thank you so much.

Regards

/Patrik.

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Sat Jan 14, 2012 6:13 pm

Hi, in cart1.php you have this line in the cart Items in Cart: 1.00
Could that bee changed so it says only Items in Cart: 1

User avatar
Navaldesign
 
 
Posts: 1003
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Navaldesign » Sat Jan 14, 2012 8:18 pm

Yes.

Open the cart 1 HTML, Start of page, and edit this line

$tq = number_format($total_quantity, 2);

to

$tq = $total_quantity;

It is almost at the bottom of the code.
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Sat Jan 14, 2012 9:23 pm

Great. Thank you.

User avatar
Navaldesign
 
 
Posts: 1003
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Navaldesign » Sat Jan 14, 2012 10:22 pm

I suggest that you wait a bit, until the final version (stable) is released. I will then include instructions on the upgrade.
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Sun Jan 15, 2012 3:47 pm

Hi, i have a question. I have added an option in Payment option (Invoice) in the checkout page.
Now in the thankyou page whare the Paypal button would appear if the user choosed to pay via Paypal, i want a submittbutton to appear if a user choos to pay via Invoice. And that submit bouton chould take the user to invoicethankyou.php page

How could i do that?

Thank's

User avatar
Navaldesign
 
 
Posts: 1003
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Navaldesign » Sun Jan 15, 2012 9:19 pm

What would a "submit" button do in that page ?? There is no form in that page (other than the PayPal button, which is a form)

So what purpose would this "submit" button serve ??
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Sun Jan 15, 2012 10:41 pm

Navaldesign wrote:What would a "submit" button do in that page ?? There is no form in that page (other than the PayPal button, which is a form)

So what purpose would this "submit" button serve ??
I figuerd it out now:

Code: Select all

?php 

if ($_SESSION['paymenttype'] == "Faktura")
{ 
$form = '
<form action="./faktsend.php" method="post"> 
<a href="./faktsend.php"><img src="images/fakturabet2.png" id="Image5" alt="" border="0" style="width:180px;height:66px;"></a></div>
<input type="submit" id="Button1" name="" value="" class="" style="">
</form> 
'; 
echo $form;
}


?> 
I just want a pay by invoice image link to appear if a user has choosen to pay by invoice. Like if a user chooses to pay with Paypal then the PayPal pay button would appear.
so it dont need to bee a submit button, could just be a image link to the page faktsend.php

And in the faktsend.php page i will have information about the invoice ex, rules and to let the user know that an invoice will bee sent out in no loger that 48 hrs, etc.

User avatar
Navaldesign
 
 
Posts: 1003
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Navaldesign » Sun Jan 15, 2012 10:48 pm

You can use a button (not submit) or an image, linked to the invoice details page.
www.dbtechnosystems.com

User avatar
Patrik iden
 
 
Posts: 538
Joined: Wed Mar 24, 2010 9:07 pm
Location: Sweden

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Patrik iden » Sun Jan 15, 2012 10:57 pm

Navaldesign wrote:You can use a button (not submit) or an image, linked to the invoice details page.
Yes i got it, the code i posted works.

Thank you.

User avatar
Navaldesign
 
 
Posts: 1003
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Webshop Plus! v.3.0 RC (Release Candidate)

Post by Navaldesign » Sun Jan 15, 2012 11:06 pm

Code: Select all

<?php 
if ($_SESSION['paymenttype'] == "Faktura")
{ 
?>
<a href="./faktsend.php"><img src="images/fakturabet2.png" id="Image5" alt="" border="0" style="width:180px;height:66px;"></a>
<?php
}
?>


This is enough, you need no form !
www.dbtechnosystems.com

Post Reply