浏览代码

changed 'add to cart' button text on pricing page

bach 4 年之前
父节点
当前提交
4fe9f08b67

+ 1 - 1
web/themes/custom/materiotheme/assets/dist/module-pricing.bundle.js

@@ -1 +1 @@
-(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[665],{1003:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>v});var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"pricing"}},[t.products.length?t._l(t.products,(function(t){return s("Product",{key:t.uuid,attrs:{product:t}})})):s("div",{staticClass:"loading"},[s("span",[t._v(t._s(t.$t("default.Loading…")))])])],2)};o._withStripped=!0;var r=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("article",{staticClass:"product"},[s("header",[s("h1",{domProps:{innerHTML:t._s(t.product.title)}})]),t._v(" "),s("section",{staticClass:"content"},[s("div",{staticClass:"description",domProps:{innerHTML:t._s(t.product.body)}})]),t._v(" "),t.isAdherent?t._e():s("aside",t._l(t.product.variations,(function(e){return s("div",{key:e.id,staticClass:"variation"},[s("div",{staticClass:"variation-description",domProps:{innerHTML:t._s(e.description)}}),t._v(" "),s("button",{attrs:{type:"button",name:"addtocart"},on:{click:function(s){return s.stopPropagation(),t.checkaddtocart(s,e.id)}}},[t._v("\n        "+t._s(t.$t("default.Add to cart"))+"\n      ")])])})),0)])};r._withStripped=!0;var n=s(4408),i=s(1423);const c={name:"Product",router:n.Z,props:["product"],mixins:[i.Z],data:()=>({quantity:1})};var a=s(1900),d=(0,a.Z)(c,r,[],!1,null,"0f9e2147",null);d.options.__file="web/themes/custom/materiotheme/vuejs/components/Content/Product.vue";const u=d.exports;var p=s(629);const l={name:"Pricing",computed:{...(0,p.rn)({products:t=>t.Pages.products})},created(){this.products.length||this.getProducts()},methods:{...(0,p.nv)({getProducts:"Pages/getProducts"})},components:{Product:u}};var m=(0,a.Z)(l,o,[],!1,null,"bdd44e2e",null);m.options.__file="web/themes/custom/materiotheme/vuejs/components/Pages/Pricing.vue";const v=m.exports}}]);
+(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[665],{1003:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>v});var r=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"pricing"}},[t.products.length?t._l(t.products,(function(t){return s("Product",{key:t.uuid,attrs:{product:t}})})):s("div",{staticClass:"loading"},[s("span",[t._v(t._s(t.$t("default.Loading…")))])])],2)};r._withStripped=!0;var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("article",{staticClass:"product"},[s("header",[s("h1",{domProps:{innerHTML:t._s(t.product.title)}})]),t._v(" "),s("section",{staticClass:"content"},[s("div",{staticClass:"description",domProps:{innerHTML:t._s(t.product.body)}})]),t._v(" "),t.isAdherent?t._e():s("aside",t._l(t.product.variations,(function(e){return s("div",{key:e.id,staticClass:"variation"},[s("div",{staticClass:"variation-description",domProps:{innerHTML:t._s(e.description)}}),t._v(" "),s("button",{attrs:{type:"button",name:"addtocart"},on:{click:function(s){return s.stopPropagation(),t.checkaddtocart(s,e.id)}}},[t._v("\n        "+t._s(t.$t(t.variation_btn_txt[e.id]))+"\n      ")])])})),0)])};o._withStripped=!0;var n=s(4408),i=s(1423);const a={name:"Product",router:n.Z,props:["product"],mixins:[i.Z],data:()=>({quantity:1,variation_btn_txt:{3:"Yeees!",4:"Yay!",5:"Great!",6:"OKAY!"}})};var c=s(1900),d=(0,c.Z)(a,o,[],!1,null,"0f9e2147",null);d.options.__file="web/themes/custom/materiotheme/vuejs/components/Content/Product.vue";const u=d.exports;var p=s(629);const l={name:"Pricing",computed:{...(0,p.rn)({products:t=>t.Pages.products})},created(){this.products.length||this.getProducts()},methods:{...(0,p.nv)({getProducts:"Pages/getProducts"})},components:{Product:u}};var _=(0,c.Z)(l,r,[],!1,null,"bdd44e2e",null);_.options.__file="web/themes/custom/materiotheme/vuejs/components/Pages/Pricing.vue";const v=_.exports}}]);

二进制
web/themes/custom/materiotheme/assets/dist/module-pricing.bundle.js.gz


文件差异内容过多而无法显示
+ 1 - 1
web/themes/custom/materiotheme/assets/dist/report.html


+ 7 - 34
web/themes/custom/materiotheme/vuejs/components/Content/Product.vue

@@ -5,7 +5,6 @@
     </header>
     <section class="content">
       <div class="description" v-html="product.body"/>
-      <!-- <div class="price-description" v-html="product.price_description"/> -->
     </section>
     <aside v-if="!isAdherent">
       <div
@@ -19,40 +18,19 @@
           name="addtocart"
           @click.stop="checkaddtocart($event, variation.id)"
         >
-          {{ $t("default.Add to cart") }}
+          {{ $t(variation_btn_txt[variation.id]) }}
         </button>
       </div>
 
     </aside>
 
-    <!-- <Modal
-      v-if="showLoginModal"
-      @close="closeModal"
-      :styles="{width:'500px', height:'350px'}"
-    >
-      <section id="pricing-modal-login-register">
-        <h2>{{ $t("materio.Please login or create a new account") }}</h2>
-        <LoginRegister
-          :callbackargs="showLoginModal"
-          @onLogedIn="onLogedIn"
-          @onRegistered="onRegistered"
-        />
-      </section>
-    </Modal> -->
-
   </article>
 </template>
 
 <script>
 
-// import { REST } from 'vuejs/api/rest-axios'
 import router from 'vuejs/route'
-// import { mapState, mapActions } from 'vuex'
 import productsMixins from 'vuejs/components/productsMixins'
-// import Modal from 'vuejs/components/Helper/Modal'
-// import LoginRegister from 'vuejs/components/Helper/LoginRegister'
-
-// let basePath = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix;
 
 export default {
   name: "Product",
@@ -63,19 +41,14 @@ export default {
     return {
       quantity: 1,
       // showLoginModal:false
+      variation_btn_txt: {
+        3: 'Yeees!',
+        4: 'Yay!',
+        5: 'Great!',
+        6: 'OKAY!'
+      }
     }
   }
-  // ,
-  // methods:{
-  //   // ...mapActions({
-  //   //   userLogin: 'User/userLogin'
-  //   // })
-  // }
-  // ,
-  // components: {
-  //   Modal,
-  //   LoginRegister
-  // }
 }
 </script>
 

部分文件因为文件数量过多而无法显示