EditQuoteProduct Component
The EditQuoteProduct component simplifies the Quote Wizard flow. It combines the enhanced Guided Selling and Product Selector components with one Visualforce page responsible for all product-related actions.
The EditQuoteProduct component is available in Zuora Quotes, Version 7.40+.
The EditQuoteProduct component consists of:
- EditQuoteProduct.component: The Visualforce UI component
- EditQuoteProductController.class: The Apex controller class for the EditQuoteProduct UI component
-
EditQuoteProductOptions: The Apex class that stores the configuration options specified by the developer and used by the controller to render the component
-
EditQuoteProducts.page: The Visualforce page with the EditQuoteProduct component
EditQuoteProduct Component Attributes
The EditQuoteProduct component has the following attribute.
Attribute | Type | Required? | Description |
---|---|---|---|
editQuoteProductOptions | zqu.EditQuoteProductOptions | Required | The Apex class used to pass in the options for the CpqSelectProduct and ProductBundleGuidedSelling components. |
EditQuoteProductOptions Class
The EditQuoteProduct component has the EditQuoteProductOptions class that provides the following property options.
Property | Type | Required? | Description |
---|---|---|---|
guidedSellingOptions | zqu. ProductBundleGuidedSellingOptions | Required | The configuration options for the ProductBundleGuidedSelling component in the page. |
initialComponentMode | String | Required | This parameter determines how the component will initially be rendered. The available options are:
|
productSelectorOptions | zqu. SelectProductComponentOptions | Required | The configuration options for the CpqSelectProduct component in the page. |
EditQuoteProducts Page
You can insert the pre-configured EditQuoteProducts Visualforce page into your Quote Wizard flow. To use this page, you must include the id of the quote as one of the URL parameters, e.g. https://zqu.na10.visual.force.com/apex/EditQuoteProducts?id=a1sF000000FZQxiIAH
Sample Code for the EditQuoteProduct Component
Visualforce Page Example
Add the EditQuoteProduct component to your Visualforce page inside the <apex:form> tag and set up the component options in your controller. Use the zqu__QuoteWizardTemplateNoForm template to ensure that your Visualforce page will have the Quote Wizard context.
<apex:page id="EditQuoteProducts" sideBar="false" tabStyle="zqu__Quote__c" standardController="zqu__Quote__c" extensions="CustomEditQuoteProductsController"> <apex:composition template="zqu__QuoteWizardTemplateNoForm"> <apex:define name="PageBody"> <apex:form> <zqu:EditQuoteProduct editQuoteProductOptions= "{!editProductOptions}"/> </apex:form> </apex:define> </apex:composition> </apex:page>
Apex Controller Example
public with sharing class CustomEditQuoteProductsController { public zqu.EditQuoteProductOptions editProductOptions { get; set; } public CustomEditQuoteProductsController (ApexPages.StandardController controller) { editProductOptions = new zqu.EditQuoteProductOptions(); editProductOptions.guidedSellingOptions = new zqu.ProductBundleGuidedSellingOptions(); editProductOptions.guidedSellingOptions.quoteType = 'Subscription'; editProductOptions.guidedSellingOptions.quoteId = '1ws34edftg2fg0d'; editProductOptions.productSelectorOptions = new zqu.SelectProductComponentOptions(); editProductOptions.productSelectorOptions.quoteType = 'Subscription'; editProductOptions.productSelectorOptions.quoteId = '1ws34edftg2fg0d'; editProductOptions.initialComponentMode = zqu.EditQuoteProductOptions.GUIDED_SELLING_MODE; } }