0

I want to show my custom attribute on the wishlist sidebar section, how to add my custom attribute "brand & Size" attributes into this,

eg:

<div data-bind="html:product_brand "></div> 

Brand is my attribute, its not showing,

 <div data-bind="html: product_price"></div>

price is showing, how to display my brand attribute.

I want to add attribute : brand & size

1

To use any custom attribute in the knockout, you need to add them in customerData

Check Method getItemData of Class Magento\Wishlist\CustomerData\Wishlist,all the product attributes used in knockout part are defined here. You need to add your required attributes with key to the final returned array, to use it in phtml.

7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.