4 var website = openerp.website;
6 website.EditorBar.include({
8 this.registerTour(new website.EditorShopTour(this));
13 website.EditorShopTour = website.Tour.extend({
15 name: "Create a product",
16 init: function (editor) {
20 stepId: 'welcome-shop',
21 title: "Welcome to your shop",
22 content: "You successfully installed the e-commerce. This guide will help you to create your product and promote your sales.",
23 template: self.popover({ next: "Start Tutorial", end: "Skip It" }),
27 stepId: 'content-menu',
28 element: '#content-menu-button',
30 title: "Create your first product",
31 content: "Click here to add a new product.",
36 element: '#create-new-product',
38 title: "Create a new product",
39 content: "Select 'New Product' to create it and manage its properties to boost your sales.",
43 afterSubmit: 'product-page',
49 element: '.modal input[type=text]',
52 content: "Enter a name for your new product then click 'Continue'.",
55 stepId: 'product-page',
56 title: "New product created",
57 content: "This page contains all the information related to the new product.",
58 template: self.popover({ next: "OK" }),
63 element: '.product_price',
65 title: "Change the public price",
66 content: "Edit the sale price of this product by clicking on the amount. The price is the sale price used in all sale order when selling this product.",
67 template: self.popover({ next: "OK" }),
70 stepId: 'update-image',
71 element: '#wrap img.img:first',
73 title: "Update image",
74 content: "Click here to set an image describing your product.",
75 triggers: function () {
76 function registerClick () {
77 $('button.hover-edition-button').one('click', function () {
78 $('#wrap img.img:first').off('hover', registerClick);
79 self.moveToNextStep();
82 $('#wrap img.img:first').on('hover', registerClick);
87 stepId: 'upload-image',
88 element: 'button.filepicker',
90 title: "Upload image",
91 content: "Click on 'Upload an image from your computer' to pick an image describing your product.",
92 template: self.popover({ next: "OK" }),
93 triggers: function () {
94 $(document).on('hide.bs.modal', function () {
95 self.moveToStep('add-block');
100 stepId: 'save-image',
101 element: 'button.save',
103 title: "Save the image",
104 content: "Click 'Save Changes' to add the image to the product decsription.",
108 element: 'button[data-action=snippet]',
110 title: "Describe the product for your audience",
111 content: "Insert blocks like text-image, or gallery to fully describe the product and make your visitors want to buy this product.",
115 stepId: 'drag-big-picture',
116 snippet: 'big-picture',
118 title: "Drag & Drop a block",
119 content: "Drag the 'Big Picture' block and drop it in your page.",
123 stepId: 'save-changes',
124 element: 'button[data-action=save]',
126 title: "Save your modifications",
127 content: "Once you click on save, your product is updated.",
132 stepId: 'publish-product',
133 element: 'button.js_publish_btn',
135 title: "Publish your product",
136 content: "Click to publish your product so your customers can see it.",
140 return this._super();
142 trigger: function () {
143 return (this.resume() && this.testUrl(/^\/shop\/product\/[0-9]+\//)) || this._super();