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",
17 init: function (editor) {
21 stepId: 'welcome-shop',
24 title: "Welcome to your shop",
25 content: "You successfully installed the e-commerce. This guide will help you to create your product and promote your sales.",
26 template: self.popover({ next: "Start Tutorial", end: "Skip It" }),
29 stepId: 'content-menu',
30 element: '#content-menu-button',
33 title: "Create your first product",
34 content: "Click here to add a new product.",
38 element: '#create-new-product',
40 title: "Create a new product",
41 content: "Select 'New Product' to create it and manage its properties to boost your sales.",
43 $(document).one('shown.bs.modal', function () {
44 $('.modal button.btn-primary').click(function () {
45 self.movetoStep('product-page');
47 self.movetoStep('enter-name');
53 element: '.modal input[type=text]',
56 content: "Enter a name for your new product.",
60 stepId: 'product-page',
63 title: "New product created",
64 content: "This page contains all the information related to the new product.",
65 template: self.popover({ next: "OK" }),
69 element: '.product_price',
71 title: "Change the public price",
72 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.",
73 template: self.popover({ next: "OK" }),
77 element: 'button[data-action=snippet]',
80 title: "Describe the product for your audience",
81 content: "Insert blocks like text-image, or gallery to fully describe the product and make your visitors want to buy this product.",
87 return this.isCurrentStep('product-page') && !this.tour.ended();
89 trigger: function (url) {
90 return (this.resume() && this.testUrl(/^\/shop\/product\/[0-9]+\/\?enable_editor=1/)) || this._super();