You have no items in your shopping cart.

Sunday, November 24, 2024 2:34:06 AM

Add custom checkoutAttributes on checkout page.

Posted: 7 years ago

#6588 Quote

rrogne

Posted: 7 years ago

#6588 Quote
Hi i have a problem with your commentbox attribute on the checkout page. Therefor i need to use a checkoutattribute created as checkoutattribut in admin, that will operate the same way as your commentbox. How do i display that custom attribute on the checkout page?

Posted: 7 years ago

#6589 Quote

Support

Posted: 7 years ago

#6589 Quote
We did plugin many years ago and order comment is plugin features.
NopCommerce allows customer to add new checkout attributes now.
But plugin doesn't support this feature now.
I'll add support checkout attributes.
What nopcommerce version do you use now and we'll add this feature from your nop version?

P.S.
We plan to add them many times but :).
It's time to add checkout attributes.
Thank you.



Posted: 7 years ago

#6593 Quote

rrogne

Posted: 7 years ago

#6593 Quote
Hi, thanks for a fast reply!

I am currently using version 3.9.

My problem is that with some paymentmethods the comment is from a customer is erased. Do you have any idea of what could be wrong?

Best regards / Robin

Posted: 7 years ago

#6595 Quote

rrogne

Posted: 7 years ago

#6595 Quote
It has to be somewhere when you call PlaceOrder function you update the order somehow.

What should I add after this has been processed.

var placeOrderResult = _orderProcessingService.PlaceOrder(processPaymentRequest);

Posted: 7 years ago

#6598 Quote

Support

Posted: 7 years ago

#6598 Quote
Can you say me one payment method for example with this problem?
Or it takes place from time to time.

Posted: 7 years ago

#6599 Quote

rrogne

Posted: 7 years ago

#6599 Quote
This is a custom plugin Klarna checkout  https://github.com/Motillo/klarna-checkout-nopcommerce.

The thing is that this plugin has its own placeOrder. And when i place a order with example some standard methods, the attribute is inserted in some magic way on the order. But not when this plugin trigger the placeOrder function.

See row 465 here https://github.com/Motillo/klarna-checkout-nopcommerce/blob/master/src/Controllers/KlarnaCheckoutController.cs

After that order is placed i could manually add the CheckoutAttributeDescription on the order, but i need to access the information the customer added.

My best regards / Robin

Posted: 7 years ago

#6600 Quote

Support

Posted: 7 years ago

#6600 Quote
Ok.
Thank you. I'll see and answer you.
I am sure that plugin had to add this customer's comment, but I'll check it.

Posted: 7 years ago

#6601 Quote

rrogne

Posted: 7 years ago

#6601 Quote
Yes i assume we have to add it manually. The problem for me is how do i access the attribute from commentBox, because that is some SimpleCheckout Specific attribute.

Posted: 7 years ago

#6603 Quote

Support

Posted: 7 years ago

#6603 Quote
I'll add support checkout attributes from the box.
You will be able to create checkout attribute for customer's comment.
Please wait one-two days.

Posted: 7 years ago

#6604 Quote

rrogne

Posted: 7 years ago

#6604 Quote
Nice, i appreciate it a lot!
The upgrade process is it only to change the .dll file? Or is there som major changes in the views as well?

Posted: 7 years ago

#6606 Quote

Support

Posted: 7 years ago

#6606 Quote
I hope yes.

Posted: 7 years ago

#6664 Quote

rrogne

Posted: 7 years ago

#6664 Quote
Hi, is there any update on this?

Posted: 7 years ago

#6665 Quote

Support

Posted: 7 years ago

#6665 Quote
Yes and no. I was sick last week and my disease destroyed my plan.
I changed plugin but I haven't finished all test yet.
I have one bug.
I'll write in this topic.

Posted: 7 years ago

#6746 Quote

rrogne

Posted: 7 years ago

#6746 Quote
Hi any update on this?

Posted: 7 years ago

#6747 Quote

Support

Posted: 7 years ago

#6747 Quote
I am sorry for delay. You waited more two weeks, but I told that you would wait two days.
I'll send you new release today.

Posted: 7 years ago

#6748 Quote

Support

Posted: 7 years ago

#6748 Quote
Try new release.

If you don't want to replace all cshtml files (you changed them before).
How to upgrade plugin?

1. Replace DLL file.
2. Add new function checkoutAttributeChange in _SimpleCheckoutScript.cshtml.
3. Add new cshtml file _CheckoutAttributes.cshtml.
4. Change SimpleOrderSummary.cshtml or SimpleOrderSummary2.cshtml.
Add this code

        if (Model.CheckoutAttributes.Count() > 0)
                {
            <div class="selected-checkout-attributes">
                @Html.Partial((string)Model.CustomProperties["_CheckoutAttributes"], Model.CheckoutAttributes)
            </div>
        }


old code
if (!String.IsNullOrEmpty(Model.CheckoutAttributeInfo))
                {
        <div class="selected-checkout-attributes">
            @Html.Raw(Model.CheckoutAttributeInfo)
        </div>
                }



About problem.
We wasted a lot of time for solving problem with another our plugin Payment Method Rules. You can create a payment rule using checkout attributes.
Example.
Add new payment rule
- display 'Direct PayPal payment method' if customer selected checkout attribute 'Use gift wrapping'.
But you can have new condition on cart page
- hide checkout attribute 'Use gift wrapping' if customer selected 'Direct PayPal payment method'.

I realize that the store's owner had to think about such problem himself, but ....
We haven't solve this problem yet. In this release we use the next logic.
Customer changed checkout attribute but plugin didn't refresh payment method/ shipment method list.




Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved