Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using Umbraco 7.11.1 with Tea Commerce 3.2.4
I'm working on implementing variants on a shop but another little challenge has arise.
When adding a product with a variant to the basket, it cannot find the product name, only the variant name.
This is likely because I don't use the property productName but rather the page title. Is it possible to implement a fallback so the page title of the product is used, rather than a property entitled productName?
Hmm, this should actually be how this works. It's the product information extractor that is in control of pulling out the product information and it does already have this fallback:
Ahh, are you saying it's showing the variant name and not the master product name?
If so, you might want to add the master product name as an OrderLineProperty (see docs here on how to do it: https://docs.teacommerce.net/3.3.0/api/order-line/#addorupdateorderline the second example is passing some properties to the orderline) then update your cart to display the orderlines master product name, rather than the variant name.
Hope this helps
Matt.. It's getting increasingly embarrassing seeing your name with a solution in every post I make....
It works as a CHARM! For those in my shoes, here's the solution:
First: Add the correct input fields on your product page, here's an example of my code:
<form method="post" action="/base/TC/FormPost.aspx" class="ajaxForm" data-product-id="@productPage.Id">
<input name="AddOrUpdateOrderLine" value="productIdentifier, quantity, properties" type="hidden" />
<input name="storeId" value="@storeId" type="hidden" />
<input name="productIdentifier" value="@productPage.Id" type="hidden" />
<input name="quantity" value="1" type="hidden" />
@* Below are my two custom fields *@
<input name="productNameInput" value="@CurrentPage.Name" type="hidden" />
<input name="properties" value="productNameInput" type="hidden" />
Second: Go to your shopping cart and add the following line to display the custom property:
REMEMBER: You'd probably like to add the Master Product Name to these places as well:
Voila, works like a charm!
Thank you Matt for the solution
Hehe, it's my job 😁
Glad you got it working. And thanks again for sharing the full solution 👍
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted