Show barcode in wishlist page

Show barcode for each item in wishlist page.

JS file

_.extend(ProductListDisplayFullView.prototype, {
                    getContext: _.wrap(ProductListDisplayFullView.prototype.getContext, function (fn) {
                        try {
                            var original_Ret = fn.apply(this, _.toArray(arguments).slice(1));
                            // console.log('original_Ret', original_Ret)
                            // console.log('this', this);

                            original_Ret.wishlistBarcode = this.model.attributes.item.attributes.upccode
                            // console.log('test', original_Ret.wishlistBarcode);
                        } catch (e) {
                            console.log("err@barcode2View", e);
                        }

                        return original_Ret
                    })
                });

Template file : add the variable in the place where required

<p class=”wishlist-barcode”>{{wishlistBarcode}}</p>

Leave a comment

Your email address will not be published. Required fields are marked *