We're building a shop using Merchello using FastTrack as an example.
I installed Merchello without the fasttrack and I am able to call most steps in the process. I can add and remove products to the basket.
For example adding products to the basket I do by using the next line in my view:
@Html.Action("AddProductToBasketForm", "StoreBasket", new { area = "Merchello", model = Model })
But when I try to implement the checkout I run into a problem. In my view I use:
@Html.Action("BillingAddressForm", "CheckoutAddress", new { area = "Merchello" })
but when I run it I get the yellow screen saying "No route in the route table matches the supplied values."
Do I call the wrong method or do I forget something?
Since I didn't find the answer yet, I tried to make a very simple Surfacecontroller to test like so:
public class TestCheckoutController : MerchelloSurfaceController
{
public ActionResult Checkout()
{
var currentCustomer = new CustomerContext(Umbraco.UmbracoContext).CurrentCustomer;
if (!currentCustomer.IsAnonymous)
{
var basket = currentCustomer.Basket();
var checkoutManager = basket.GetCheckoutManager();
var billingAddress = checkoutManager.Customer.GetBillToAddress();
var shippingAddress = checkoutManager.Customer.GetShipToAddress();
}
return View();
}
}
After the shippingAddress I put a breakpoint. When I reach this breakpoint I can see that both currentCustomer and checkoutManager.Customer contain the addresses I entered in the backoffice.
But: both billingAddress and shippingAddress are empty, the GetBillToAddress() and GetShipToAddress() methods return null.
The project I am working on is in fact a very simple store: there is only one shipping and one payment method, all customers need to login before ordering and have a static billing address.
At the moment I have got the custom surfacecontroller working and will go on with that one, but for future projects I will certainly use the fasttrack binaries and the overview of checkout-actions you have given here!
Problem with Merchello checkout
Hi,
We're building a shop using Merchello using FastTrack as an example.
I installed Merchello without the fasttrack and I am able to call most steps in the process. I can add and remove products to the basket. For example adding products to the basket I do by using the next line in my view:
But when I try to implement the checkout I run into a problem. In my view I use:
but when I run it I get the yellow screen saying "No route in the route table matches the supplied values."
Do I call the wrong method or do I forget something?
Since I didn't find the answer yet, I tried to make a very simple Surfacecontroller to test like so:
After the shippingAddress I put a breakpoint. When I reach this breakpoint I can see that both currentCustomer and checkoutManager.Customer contain the addresses I entered in the backoffice.
But: both billingAddress and shippingAddress are empty, the GetBillToAddress() and GetShipToAddress() methods return null.
I have not found any example of how to make a simple checkout procedure. In an old forum-topic I found a reference to http://merchello.com/documentation/getting-started/how-to/Simple-Checkout-Process but that leads to an errorpage.
How do I have to setup the checkout in Merchello?
You have the wrong route for the billing address. It should be in the fasttrack
Not area = Merchello.
https://github.com/Merchello/Merchello/blob/f3dd636fb3449d58d82ecd178b2ce9b1093c9615/src/Merchello.FastTrack.Ui/Views/ftBillingAddress.cshtml
Sorry, I've just re-read that. You will need FastTrack to use that action as FastTrack is the implementation of our starter kit.
I realise it's a bit confusing with some using the area = merchello and some using the area = fasttrack.
But have a read of this post for more info:
https://merchello.com/blog/fasttrack-build-ecommerce-sites-in-umbraco-quickly/
You can pull in the fasttrack binaries using the nuget package
https://www.nuget.org/packages/Merchello.FastTrack/
It won't create all the FastTrack site but it will enable you to use the Actions you are trying to use, such as these
Basket Summary
Render the Invoice Summary
Render the SalesReceipt
Render the Billing Address Form
Render the ShippingAddressForm
Render the Shipping Rate Quote form
Render the PaymentMethodForm
Render the ResolvePayment
Render the LoginForm
Render the RegisterForm
Render the CustomerSalesHistory
Render the CustomerBillingAddress
Render the CustomerShippingAddress
Hi Lee,
Thanks for your answer!
The project I am working on is in fact a very simple store: there is only one shipping and one payment method, all customers need to login before ordering and have a static billing address.
At the moment I have got the custom surfacecontroller working and will go on with that one, but for future projects I will certainly use the fasttrack binaries and the overview of checkout-actions you have given here!
is working on a reply...