When I add item to the quoteitems in quote entity, I can click a link that directs me to the view. The template makeup for the href is in detail.tpl and the url is <a href="{{scope}}/View/{{productId}}">{{value}}</a>. I want to change {{scope}} which is right now, "#QuoteItem". I had modified the code to add different entity as oppose to product. I'm not sure where the scope value is located. Once user selects an item, I want to change it to the item's entity name.
Changing the href for the quoteitem to item's entity name
Collapse
X
-
Tags: None
-
I added a field in quoteitem.json.Code:"itemEntity": {
Code:[COLOR=#252C2F][FONT=Helvetica][SIZE=13px]"type":"varchar"}[/SIZE][/FONT][/COLOR][COLOR=#252C2F][FONT=Helvetica][SIZE=13px][/SIZE][/FONT][/COLOR]
PHP Code:'itemEntity' => $o->itemEntity
Code:data['nameScope'] = this.model.get('itemEntity'); //in data function
Code:[COLOR=#252C2F][FONT=Helvetica][SIZE=13px]//and in this.model.set[/SIZE][/FONT][/COLOR] [COLOR=#252C2F][FONT=Helvetica][SIZE=13px]this.model,set({[/SIZE][/FONT][/COLOR] [COLOR=#252C2F][FONT=Helvetica][SIZE=13px]itemEntity: product.name[/SIZE][/FONT][/COLOR] [COLOR=#252C2F][FONT=Helvetica][SIZE=13px]})[/SIZE][/FONT][/COLOR] [COLOR=#252C2F][FONT=Helvetica][SIZE=13px]//and in name/detail.tpl, I changed the href to[/SIZE][/FONT][/COLOR] [COLOR=#252C2F][FONT=Helvetica][SIZE=13px]<a href="#{nameScope"/view/id>[/SIZE][/FONT][/COLOR]
-
I figured it out. I had to addCode:itemEntity: this.model.get('itemEntity') || null
Comment
Comment