Pass Parameters from OrderSummary to Custom page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 14 años
I need to pass parameters when I press "Checkout" button (located on Modules/OrderSumarry.aspx) I redirected to another page with the following parameters:

Order ID
User ID
Total
SubTotal

The link should look like this

https://myServer/newpage/YourOrder.aspx?CustomerID=01&OrderID=01&Total=10&Subtotal=10;

I succeeded on redirect to another page but i fail to include parameters with the link

any help would be much appreciated
Hace 14 años
You can get the Shoppingcart Total and Subtotal, but not the Order ID, because at this point the order is not created yet.
If you want the totals, use the ShoppingCartManager to fetch the values.

If you want to pass the customer ID, remember that the customer does not have to be logged in at this point.
Hace 14 años
Thanks for your help linkXperts

I have changed my plane, now I have created payment method that will redirect the user to my payment page with the parameters:


    protected void Page_Load(object sender, EventArgs e)
    {
        ShoppingCart Cart = ShoppingCartManager.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart);
        decimal shoppingCartSubTotalDiscount;
        decimal shoppingCartSubTotal = ShoppingCartManager.GetShoppingCartSubTotal(Cart, NopContext.Current.User, out shoppingCartSubTotalDiscount);
        decimal shoppingCartSubTotalConverted = CurrencyManager.ConvertCurrency(shoppingCartSubTotal, CurrencyManager.PrimaryStoreCurrency, NopContext.Current.WorkingCurrency);
        decimal total = shoppingCartSubTotal;
        Response.Redirect("https://localhost/knet-aspx/payonload.aspx?total=" + shoppingCartSubTotal);
    }


as you know you can not reach to any step when you lick on checkout if you are not logged on.

After that my costume payment web page will do the rest

So I still need the User ID to pass it with the total
Hace 14 años
Hello

anyone know how to get userID and userName ?

Thanks :)
Hace 14 años
Hello all

I managed to get userID, userEmail, OrderID and Total


// GET USER ID
                    object usreid = NopContext.Current.User.CustomerID;

                    // GET USER E-Mail
                    string useremail = NopContext.Current.User.Email;

                    // GET ORDER NUMBER
                    OrderCollection orderCollection = NopContext.Current.User.Orders;
                    Order lastOrder = orderCollection[0];
                    string ThisorderID = lastOrder.OrderID.ToString();

                    // GET TOTAL (NOT SUB-TOTAL)

                    object shoppingCartThisTotal = ShoppingCartManager.GetShoppingCartTotal(Cart, NopContext.Current.User);



hope this will help some one :)
Hace 13 años
hii

thanks for the details brother still didn't tried but it should work ok

can u please provide the complete codes and classes required to create this new payment gateway ??


that would be appriciated


with regards
Hace 13 años
Hello

make it as a separate project and use the same pages as they provided you

are you using local server or you are hosting somewhere ?
Hace 13 años
i will be hosting the website on arvixe

and i am new to this i hope u can help me out for this

have u done any website with knet and nopcommerce ??

if yes can i see ur website whts d address ??
Hace 12 años
Can You please support us with the code for the K-Net .
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.