Adding product name to orderline along with variant name
I'm using Umbraco 7.11.1 with Tea Commerce 3.2.4
Hi guys,
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.
Adding product name to orderline along with variant name
I'm using Umbraco 7.11.1 with Tea Commerce 3.2.4
Hi guys,
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?
// Mike
Hi Mike,
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:
https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/blob/770705bdea8f20fd9e146c27724c9a830454c8e0/Source/TeaCommerce.Umbraco.Configuration/InformationExtractors/PublishedContentProductInformationExtractor.cs#L123
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
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:
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
// Mike
Hehe, it's my job 😁
Glad you got it working. And thanks again for sharing the full solution 👍
Matt
is working on a reply...