code Archives - Code Craftsman https://www.codecraftsman.us/ Tales from a Dev Dad Tue, 04 Oct 2022 03:24:14 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.3 https://www.codecraftsman.us/wp-content/uploads/2020/08/cropped-code-craftsman-logo-32x32.png code Archives - Code Craftsman https://www.codecraftsman.us/ 32 32 How to override a WooCommerce product’s price https://www.codecraftsman.us/how-to-override-a-woocommerce-products-price/ Tue, 04 Oct 2022 02:55:28 +0000 http://www.codecraftsman.us/?p=585 Taking full control of the price rendered by WooCommerce can be a tricky task, especially considering variation products and all the different locations it can be displayed. I'll show you the combination of hooks that worked for me.

The post How to override a WooCommerce product’s price appeared first on Code Craftsman.

]]>
Add Bcc address to all WooCommerce emails https://www.codecraftsman.us/add-bcc-address-to-all-woocommerce-emails/ Wed, 08 Jun 2022 02:50:14 +0000 http://www.codecraftsman.us/?p=479 Record keeping is an important part of operating a business. Having a paper trail for reference can save you from customer order conflicts and this post will show you one method to accomplish this. Knowing exactly which email notifications have been sent from Woocommerce for an order will help you to solve those issues quickly.

The post Add Bcc address to all WooCommerce emails appeared first on Code Craftsman.

]]>
How To: Code a Throttle or Debounce function in Lua https://www.codecraftsman.us/how-to-code-a-throttle-or-debounce-function-in-lua/ Tue, 26 Apr 2022 02:32:08 +0000 http://www.codecraftsman.us/?p=430 Okay, so I've been dabbling with some Lua game programming in Roblox. No jokes, it's kind of fun and my kids think I'm cool because I can build games for them.

The post How To: Code a Throttle or Debounce function in Lua appeared first on Code Craftsman.

]]>
How to share Vue components between multiple projects https://www.codecraftsman.us/how-to-share-vue-components-between-multiple-projects/ Thu, 24 Feb 2022 05:06:23 +0000 http://www.codecraftsman.us/?p=402 Avoid code duplication in your Vue-based projects by sharing components and libraries without using a 3rd-party service or symlinks.

The post How to share Vue components between multiple projects appeared first on Code Craftsman.

]]>
Create an Elementor widget using VueJS + Tailwind https://www.codecraftsman.us/create-an-elementor-widget-using-vuejs-tailwind/ Fri, 14 Jan 2022 05:55:07 +0000 http://www.codecraftsman.us/?p=386 Everyone wants a faster performing website today. Reducing server requests by keeping your interactions on the client-side is one of the best way to gain a perception of speed and improve UX.

The post Create an Elementor widget using VueJS + Tailwind appeared first on Code Craftsman.

]]>
Use Laravel Nova core components in your custom Vue component https://www.codecraftsman.us/use-laravel-nova-core-components-in-your-custom-component/ Thu, 24 Jun 2021 04:46:00 +0000 http://www.codecraftsman.us/?p=365 At time of post, Laravel Nova is currently using Vue 2.5.0. I’ve been working with Laravel lately, and particularly the Nova admin framework. In this case I was building a custom modal that launches from a Detail view and provides an entity creation form. I didn’t want to re-invent the wheel with regard to form elements, so I dug into Nova source a bit and found some clues as to how I can re-use some of their Vue components. You’ll find all of the Nova global component registrations here: I needed a BooleanGroupField, so I referenced the component key seen…

The post Use Laravel Nova core components in your custom Vue component appeared first on Code Craftsman.

]]>
Create a custom html field type in UmbracoForms https://www.codecraftsman.us/create-a-custom-html-field-type-in-umbracoforms/ Wed, 16 Sep 2020 02:06:36 +0000 http://www.codecraftsman.us/?p=177 Ran into a situation today where I needed to place some non-input UI between fields in an UmbracoForm. I was using it to place some contract term links, but it can be used for any custom html markup. I’ll preface this post by stating I’m working in: Umbraco 8.6.1UmbracoForms 8.4.2 I started by creating a new model to represent the new Field Type and place it in my class library at Models/Forms/CustomHtmlField.cs; keep it organized. If you don’t have a custom code library created yet, follow my Umbraco project setup guide. Run a build on the class library, then switch…

The post Create a custom html field type in UmbracoForms appeared first on Code Craftsman.

]]>
Validate an Umbraco Forms submission server-side https://www.codecraftsman.us/validate-an-umbraco-forms-submission-server-side/ https://www.codecraftsman.us/validate-an-umbraco-forms-submission-server-side/#respond Mon, 27 Jul 2020 11:11:20 +0000 http://www.codecraftsman.us/?p=5 Performing custom validation logic on website forms is a pretty common task. Let's explore how server-side validation can be programmed for the UmbracoForms Add-On using Visual Studio.

The post Validate an Umbraco Forms submission server-side appeared first on Code Craftsman.

]]>
https://www.codecraftsman.us/validate-an-umbraco-forms-submission-server-side/feed/ 0