<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tutorial Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<atom:link href="https://stampede-design.com/blog/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://stampede-design.com/blog/tag/tutorial/</link>
	<description>We are creating better worlds though thoughtful design and technology. Connect with us!</description>
	<lastBuildDate>Tue, 07 Apr 2026 09:05:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://stampede-design.com/wp-content/uploads/2024/02/cropped-Stampede-Favicon-old-32x32.png</url>
	<title>tutorial Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<link>https://stampede-design.com/blog/tag/tutorial/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Creating a Custom Block Type for WordPress Gutenberg Editor</title>
		<link>https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/</link>
					<comments>https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/#respond</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Wed, 20 Feb 2019 09:14:16 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[block editor]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[Gutenberg]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://stampede-design.com/?p=9619</guid>

					<description><![CDATA[<p>For all the buzz it has generated in 2018, you would need to be a hermit (or at least someone who doesn’t work in web-development) to not have heard of WordPress version 5.&#160;I&#8217;m of course referring to its game-changing feature — the new block-based editor, Gutenberg. The new editor radically changes the writing experience in&#8230;<a href="https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/"> Keep reading</a></p>
<p>The post <a href="https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/">Creating a Custom Block Type for WordPress Gutenberg Editor</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="lead">For all the buzz it has generated in 2018, you would need to be a hermit (or at least someone who doesn’t work in web-development) to not have heard of WordPress version 5.&nbsp;I&#8217;m of course referring to its game-changing feature — the new block-based editor, Gutenberg. The new editor radically changes the writing experience in WordPress because of its block-based system. Content authors can now treat content editing with more of a page building approach, akin to popular page-builders like Elementor and Divi.</p>



<p>Gutenberg by default comes with a handful of block types that should cover standard web content updating needs. However, it also has a nifty&nbsp;<a href="https://wordpress.org/gutenberg/handbook/designers-developers/developers/block-api/" target="_blank" rel="noopener noreferrer">Block API</a> for adding custom block types if you need them to display specially designed components for our website. In this tutorial, you are going to add a custom Gutenberg block type so that the output is a notice box with a few predefined styles that accepts arbitrary text input from the user.</p>



<p>This is what you&#8217;re going for.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="999" height="339" src="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output.png" alt="" class="wp-image-9622" srcset="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output.png 999w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-300x102.png 300w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-768x261.png 768w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-790x268.png 790w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-280x95.png 280w" sizes="(max-width: 999px) 100vw, 999px" /><figcaption> Our custom Notice blocks’ final output. Please ignore the crude styling because that’s not really in the scope of this tutorial. </figcaption></figure>



<p class="afterimagecaption">And here is how it looks from the admin&#8217;s side.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1274" height="866" src="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-admin.gif" alt="" class="wp-image-9621"/><figcaption> How admins would interact with the custom Notice block. </figcaption></figure>



<p class="afterimagecaption">Alright, let&#8217;s get to coding!</p>



<h2 class="wp-block-heading">Step 1: Create a plugin for the new block type</h2>



<p>You will be creating a custom block type as a WordPress plugin. This will allow you to decouple it from any themes you are using and in case anything goes wrong, you can simply deactivate it.</p>



<p>So create a new folder in the WP plugins folder and let&#8217;s call it <code>gutenberg-notice-block</code>. In this new folder, create a <code>plugin.php</code> file with the following code:</p>



<pre class="wp-block-code"><code lang="php" class="language-php line-numbers">/**
* Plugin Name: Gutenberg Notice Block
* Author: Shaiful
* Description: A notice box with a few predefined styles that accepts arbitrary text input.
* Version: 1.0
*/

// Load assets for wp-admin when editor is active
function shaiful_gutenberg_notice_block_admin() {
   wp_enqueue_script(
      'gutenberg-notice-block-editor',
      plugins_url( 'block.js', __FILE__ ),
      array( 'wp-blocks', 'wp-element' )
   );

   wp_enqueue_style(
      'gutenberg-notice-block-editor',
      plugins_url( 'block.css', __FILE__ ),
      array()
   );
}

add_action( 'enqueue_block_editor_assets', 'shaiful_gutenberg_notice_block_admin' );

// Load assets for frontend
function shaiful_gutenberg_notice_block_frontend() {

   wp_enqueue_style(
      'gutenberg-notice-block-editor',
      plugins_url( 'block.css', __FILE__ ),
      array()
   );
}
add_action( 'wp_enqueue_scripts', 'shaiful_gutenberg_notice_block_frontend' );</code></pre>



<p>Basically what this file does is initialise the plugin by loading the necessary JS and CSS files at the right place and at the right time. The code above is looking for <code>block.js</code> and <code>block.css</code>, which you will create momentarily.</p>



<p>At this point, you should be able to see the new plugin listed in your WP Plugins admin page. Go ahead and activate it.</p>



<p>Moving forward, all of your coding will be done in JavaScript with some ReactJS flavour to interact with the Gutenberg Block API.</p>



<h2 class="wp-block-heading">Step 2: Register the new block type</h2>



<p>Create a file called <code>block.js</code> in your custom plugin folder. This file will hold the entire logic of the custom block type for the admin-side and frontend of your website.</p>



<p>Start by adding the following bare-bones code.</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript line-numbers">/* block.js */
var el = wp.element.createElement;

wp.blocks.registerBlockType('shaiful-gutenberg/notice-block', {

   title: 'Notice', // Block name visible to user

   icon: 'lightbulb', // Toolbar icon can be either using WP Dashicons or custom SVG

   category: 'common', // Under which category the block would appear

   attributes: { // The data this block will be storing

      type: { type: 'string', default: 'default' }, // Notice box type for loading the appropriate CSS class. Default class is 'default'.

      title: { type: 'string' }, // Notice box title in h4 tag

      content: { type: 'array', source: 'children', selector: 'p' } /// Notice box content in p tag

   },

   edit: function(props) {
      // How our block renders in the editor in edit mode
      return null;
   },

   save: function(props) {
      // How our block renders on the frontend
      return null;
   }
});
</code></pre>



<p>The code above registers your new block type with the name “Notice”, using a light-bulb <a href="https://developer.wordpress.org/resource/dashicons/" target="_blank" rel="noopener noreferrer">Dashicon</a> and putting it under the Common Blocks panel in the Gutenberg blocks browser. You should be able to see the new block in your editor at this point.</p>



<p>You also specify the attributes (and their data type) that your new block will be storing which are the box type, the box title and the box content.</p>



<p>Lastly, there are two functions called edit() and save(). The edit() function is responsible for rendering your block in the editor while the save() function outputs your block HTML on our website&#8217;s frontend.</p>



<p>Let&#8217;s explore them now.</p>



<h2 class="wp-block-heading">Step 3: The edit() function</h2>



<p>The edit() function controls how the block will appear in the Gutenberg editor for the user to interact with.</p>



<p>For your custom Notice block type, the goal is to accomplish two things:</p>



<ol class="wp-block-list"><li>The user can select the notice box type as well as enter the box title and content.</li><li>Selecting different notice box types will show a simple live preview of what the box is going to look like on the frontend.</li></ol>



<p>Add the following code into the edit() function.</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript line-numbers">/* block.js */
edit: function(props) {
   // How our block renders in the editor in edit mode

   function updateTitle( event ) {
      props.setAttributes( { title: event.target.value } );
   }

   function updateContent( newdata ) {
      props.setAttributes( { content: newdata } );
   }

   function updateType( event ) {
      props.setAttributes( { type: event.target.value } );
   }

   return el( 'div',
      {
         className: 'notice-box notice-' + props.attributes.type
      },
      el(
         'select',
         {
            onChange: updateType,
            value: props.attributes.type,
         },
         el("option", {value: "default" }, "Default"),
         el("option", {value: "success" }, "Success"),
         el("option", {value: "danger" }, "Danger")
      ),
      el(
         'input',
         {
            type: 'text',
            placeholder: 'Enter title here...',
            value: props.attributes.title,
            onChange: updateTitle,
            style: { width: '100%' }
         }
      ),
      el(
         wp.editor.RichText,
         {
            tagName: 'p',
            onChange: updateContent,
            value: props.attributes.content,
            placeholder: 'Enter description here...'
         }
      )
   ); // End return

},  // End edit()
</code></pre>



<p>Line 16-49 is the main code you will use to display the user interface in a way that allows you to update the content in your block type. The code is written in ReactJS specifically the React.createElement() function is used to create new DOM elements. Do not worry if ReactJS is unfamiliar to you. You can make use of <a href="https://babeljs.io/repl" target="_blank" rel="noopener noreferrer">this specific tool</a> to compile <a href="https://reactjs.org/docs/introducing-jsx.html" target="_blank" rel="noopener noreferrer">JSX template code</a> to React.createElement() functions.</p>



<p>Here is an example.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1323" height="866" src="https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react.png" alt="" class="wp-image-9637" srcset="https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react.png 1323w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-300x196.png 300w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-768x503.png 768w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-790x517.png 790w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-229x150.png 229w" sizes="(max-width: 1323px) 100vw, 1323px" /><figcaption> Using Babel to compile JSX to ReactJS code. </figcaption></figure>



<p class="afterimagecaption">It&#8217;s a good idea to create your <code>block.css</code> file right now so that you can test the live preview functionality in the editor. Make sure the CSS file is saved in your plugin folder.</p>



<pre class="wp-block-code"><code lang="css" class="language-css line-numbers">/* block.css */
div.notice-box {
   border: 1px LightSkyBlue solid;
   border-left-width: 5px;
   padding: 10px 15px;
   margin: 30px;
}

div.notice-box.notice-success {
  border-color: MediumSpringGreen ;
}

div.notice-box.notice-danger{
   border-color: LightCoral ;
}

div.notice-box h4 {
   font-size: 18px;
   margin:0 0 10px 0;
}
div.notice-box p {
   font-size: 16px;
   line-height: 24px;
   margin:0;
}
</code></pre>



<p>At this point, you should be able to add your Notice block type into the editor and see three different fields for configuring the notice box. The dropdown for selecting the notice box type should also gives you a live preview between the default (blue), success (green) and danger (red) box types.</p>



<h2 class="wp-block-heading">Step 4: The save() function</h2>



<p>The save() function for your Notice block type is pretty straightforward. You just have to construct the correct HTML structure and populate the title and content into the notice box <code>&lt;div&gt;</code>. Once again the DOM elements creation code has to be written in ReactJS.</p>



<p>Here is the code:</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript line-numbers">/* block.js */
save: function(props) {
   // How our block renders on the frontend

   return el( 'div',
      {
         className: 'notice-box notice-' + props.attributes.type
      },
      el(
         'h4',
         null,
         props.attributes.title
      ),
      el( wp.editor.RichText.Content, {
         tagName: 'p',
         value: props.attributes.content
      })

   ); // End return

} // End save()
</code></pre>



<p>That&#8217;s it!</p>



<p>Your Notice block type should now work on both the admin and website&#8217;s frontend.</p>



<p>Here is the&nbsp;<a href="https://stampede-design.com/demo/gutenberg-notice-block.zip">link</a> to download the completed plugin.</p>



<h2 class="wp-block-heading">Something to keep in mind</h2>



<p>Looking at the save() function, you’d imagine that updating the HTML output in there would cause a global update for all instances of the Notice box that you have populated on your website. It’s natural to expect this (it is, at least from our experience with working with WP shortcodes). Unfortunately, this isn’t what happens.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1274" height="866" src="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error.png" alt="" class="wp-image-9620" srcset="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error.png 1274w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-300x204.png 300w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-768x522.png 768w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-790x537.png 790w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-221x150.png 221w" sizes="(max-width: 1274px) 100vw, 1274px" /></figure>



<p>Making any changes to the block HTML output would trigger a conflict with all existing instances of the blocks that have been populated. What&#8217;s worse is that the only way to fix this is by repopulating the blocks one by one. This is the caveat of static block types.</p>



<p>To work around this, make use of the&nbsp;<a href="https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks/" target="_blank" rel="noopener noreferrer">Dynamic Blocks</a>&nbsp;feature which hands over the save() function from JS to PHP to generate the block HTML output on the fly.</p>



<h2 class="wp-block-heading">Final thoughts</h2>



<p>The ability to create custom block types is very cool and opens a lot of possibilities for content customisation. After trying it out myself, I would say the basic concept is fairly easy to follow. The real challenge, however, is presenting the custom block in the best possible way to give content authors the best editing experience, especially for blocks with complex functionalities. I find that the official developer documentation for various attributes configurations or working with RichText field for example, are still lacking. It will improve surely but the best reference materials we have at this moment are online articles and the existing blocks that came out of the box with WP5.</p>



<p>On another note, I am personally looking forward to the Advanced Custom Fields (ACF) plugin taking on the custom block types with their own <a href="https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/" target="_blank" rel="noopener noreferrer">ACF Blocks for Gutenberg</a>. This new addition should lower the barrier for WP developers to take advantage of Gutenberg block capabilities in a more intuitive way.</p>
<p>The post <a href="https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/">Creating a Custom Block Type for WordPress Gutenberg Editor</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Embedding Forms in Bigcommerce Using Google Forms</title>
		<link>https://stampede-design.com/blog/google-forms-in-bigcommerce/</link>
					<comments>https://stampede-design.com/blog/google-forms-in-bigcommerce/#respond</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Fri, 11 Mar 2016 01:39:00 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[bigcommerce]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[Google Forms]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://dev.stampedelabs.com/client/v3/wp/?p=6326</guid>

					<description><![CDATA[<p>Bigcommerce out of the box sports a decent contact form that is usable for everyone 99% of the time. However, things get a little tricky if we need to add in a few extra fields in there or even a whole new form. Shaiful walks you through on how to take advantage of Google Forms to host custom forms in BigCommerce.</p>
<p>The post <a href="https://stampede-design.com/blog/google-forms-in-bigcommerce/">Embedding Forms in Bigcommerce Using Google Forms</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="lead" class="lead"><a href="http://bigcommerce.com/" target="_blank">BigCommerce</a> out of the box sports a decent contact form that is usable for everyone 99% of the time. However, things get a little tricky if we need to add in a few extra fields in there or even a whole new form; for example, a product warranty registration form. This is when we handover all form responsibilities to <a href="https://www.google.com/forms/about/" target="_blank">Google Forms</a>.</p>
<p><div class="full"><img decoding="async" class="alignnone wp-image-7156" src="https://stampede-design.com/wp-content/uploads/2016/03/thumb-bigcommerce.jpg" alt="Bigcommerce" /></div></p>
<p>The standard way of embedding Google Forms is to use an iframe, which is sufficient. The more preferable way of course is by manually extracting the form&#8217;s HTML fields and re-coding it according to your theme&#8217;s HTML structure. Not only will it match your theme nicely, but you can also insert some custom JS validation on the fields as needed. Another plus is that Google Forms captures form submissions in a convenient spreadsheet format.</p>
<h2>The Steps</h2>
<p>The first step is to create two web pages in BigCommerce that will become our form page and success page when users submit the form. The form page is a <a href="https://support.bigcommerce.com/articles/Public/Creating-Custom-Template-Files" target="_blank">custom template file</a> that will contain our form HTML codes while the success page is simply a generic page. Take note of the success page URL.</p>
<p>Next, build our form in Google Forms with the most minimalist styling. Once tested and published, view its source to get the form codes and re-code the form into our custom template file — in the HTML structure we like while preserving the field names and the &lt;form&gt; action (and method). Next is some code alterations.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;var submitted=false;&lt;/script&gt;
&lt;iframe name=&quot;hidden_iframe&quot; id=&quot;hidden_iframe&quot;style=&quot;display:none;&quot; onload=&quot;if(submitted) {window.location='SUCCESS_PAGE_URL';}&quot;&gt;&lt;/iframe&gt;


&lt;form action=&quot;https://docs.google.com/forms/d/1CsZt9s0vVegFb3-Qa3162Ri7A91ggx6S9B6qvBZcyJY/formResponse&quot; method=&quot;POST&quot; target=&quot;hidden_iframe&quot; onsubmit=&quot;submitted=true;&quot;&gt;
...your form fields...
&lt;/form&gt;


</pre>
<p>Add line 1 and 2 right before our form tag and replace the correct success page URL in line 2.</p>
<p>Next, add <code>target="hidden_iframe" onsubmit="submitted=true;"</code> attributes to the &lt;form&gt; tag so that the form submits into the hidden &lt;iframe&gt; we created in line 2.</p>
<p>Finally, give it a test run. It is advisable to validate the form fields with JS to ensure the form is indeed being submitted successfully.</p>
<p>Although this guide is written for BigCommerce, the implementation steps are generic enough to be used on any platforms where you have HTML and JS editing access. Hope it helps.</p>
<p><span class="message_body">Need help making your BigCommerce store stands out from the competition? <a href="https://stampede-design.com/contact/">Get in touch</a>.</span></p>
<p>The post <a href="https://stampede-design.com/blog/google-forms-in-bigcommerce/">Embedding Forms in Bigcommerce Using Google Forms</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/google-forms-in-bigcommerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Showing Selected Product Variant Image in Shopify Product Slideshow</title>
		<link>https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/</link>
					<comments>https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Sat, 04 Jul 2015 16:46:08 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[shopify]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ui]]></category>
		<guid isPermaLink="false">http://dev.stampedelabs.com/client/v3/wp/?p=6275</guid>

					<description><![CDATA[<p>Believe it or not, some little features on product slideshows would make all the big difference to your sales. Shaiful shows how to customise the slideshow in Shopify.</p>
<p>The post <a href="https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/">Showing Selected Product Variant Image in Shopify Product Slideshow</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="lead" class="lead">Product slideshows are indispensable when it comes to e-commerce websites. One little feature that we usually see on product slideshows is the ability to switch images based on the selection of product options such as colors. It&#8217;s a little feature that makes a difference!</p>
<p><div class="full"><img decoding="async" class="wp-image-6899 size-full" src="https://stampede-design.com/wp-content/uploads/2015/07/product-slideshow1.gif" alt="product-slideshow" /><p class="capt_block">A staple feature of e-commerce websites.</p></div></p>
<p>In Shopify, this feature may already comes standard with most of the themes or in an updated version of the current theme you are using, which is great. However in some cases you could be using a heavily customized theme and updating is not going to be a breeze, well, all you need is just a couple of lines of codes and you got yourself an upgraded product slideshow.</p>
<h2>The Code</h2>
<p>Paste the code below into the bottom of either template file product.liquid or snippet file product-form.liquid.</p>
<pre class="brush: jscript; title: ; notranslate">

{% if product.variants.size &gt; 1 %}
&lt;script&gt;
(function($) {
  var variantImages = {},
    thumbnails,
    variant,
    variantImage,
    variantImage_count = 0;
  	//produce mapping between variant image and options
    {% for variant in product.variants %}
       variant = {{ variant | json }};
       if ( typeof variant.featured_image !== 'undefined' &amp;&amp; variant.featured_image !== null ) {
         variantImage =  variant.featured_image.src.split('?')&#x5B;0].replace(/http(s)?:/,'');
         variantImages&#x5B;variantImage] = variantImages&#x5B;variantImage] || {};
         {% for option in product.options %}
           {% assign option_value = variant.options&#x5B;forloop.index0] %}
           {% assign option_key = 'option-' | append: forloop.index0 %}
           if (typeof variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}] === 'undefined') {
             variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}] = {{ option_value | json }};
           }
           else {
             var oldValue = variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}];
             if ( oldValue !== null &amp;&amp; oldValue !== {{ option_value | json }} )  {
               variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}] = null;
             }
           }
         {% endfor %}
         variantImage_count++;
   	   }
    {% endfor %}

    $(function() {

      if (variantImage_count &gt; 0) {
        $('select.single-option-selector').change(function() {
          var selected_color = $(this).val();
          thumbnails = $('.flex-control-thumbs img').each(function(index, el) {
            var image = $(el).attr('src').split('?')&#x5B;0].replace(/(_thumb\.)|(_small\.)|(_compact\.)|(_medium\.)|(_large\.)|(_grande\.)/,'.');
            if (typeof variantImages&#x5B;image] !== 'undefined') {
              if(selected_color == variantImages&#x5B;image]&#x5B;'option-0']) {
                //only check against the first option &#x5B;'option-0'], which is Color (in my case)
              	$('.flexslider').flexslider(index);
              }
            }
		      });
        });
      }

    });
})(jQuery);
&lt;/script&gt;
{% endif %}

</pre>
<p>The code is a combination of Liquid template tags and JS. It is based on the customization provided by Shopify for <a href="https://docs.shopify.com/manual/configuration/store-customization/page-specific/product-page/make-image-change-variant" target="_blank">enabling customers to select a product variant by clicking its image</a> and modified to work the other way around.</p>
<p>Line 10-30 produces the mapping between variants image and options in a JSON object that is used for comparison against the product thumbnails in the select box event handler function as seen in line 35-46. Line 42 is the actual code that tells the slideshow to jump to a specific slide. As you might have guessed, the code is unique to <a href="http://www.woothemes.com/flexslider/" target="_blank">Flexslider</a> slideshow plugin. You need to determine what slideshow plugin you are using and then figure out how to jump to a specific slide using its API.</p>
<p>I hope you find this guide useful. If you have questions/feedback, let me know in the comments.</p>
<p>Have a nice day!</p>
<p>The post <a href="https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/">Showing Selected Product Variant Image in Shopify Product Slideshow</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>WordPress CPT Solutions Comparison: Pods vs Types</title>
		<link>https://stampede-design.com/blog/wordpress-cpt-solutions-comparison-pods-vs-types/</link>
					<comments>https://stampede-design.com/blog/wordpress-cpt-solutions-comparison-pods-vs-types/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Thu, 05 Feb 2015 17:43:15 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[CPT]]></category>
		<category><![CDATA[development tools]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://dev.stampedelabs.com/client/v3/wp/?p=6299</guid>

					<description><![CDATA[<p>Pods and Types are Shaiful's two favourite solutions when it comes to WordPress' custom post types. Here he will help you decide on the best one for you, depending on your project requirements.</p>
<p>The post <a href="https://stampede-design.com/blog/wordpress-cpt-solutions-comparison-pods-vs-types/">WordPress CPT Solutions Comparison: Pods vs Types</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Starting from WordPress 3.0, custom post types (CPT) has been one of WP&#8217;s most unrivaled core features. I cannot recall how many times this wonderful feature had came to the rescue to help me achieve CMS-like functionalities in custom WP projects. As WP users, you have probably used CPT directly, by coding on it or indirectly by installing plugins that create their own CPTs like WooCommerce.</p>
<p>Since a couple of years ago, I have pretty much refrained from coding CPTs from scratch, unless for extremely simple post types. I have sworn my allegiance to two well-known CPT solution plugins namely <a href="https://wordpress.org/plugins/pods/" target="_blank"><strong>Pods</strong></a> and <a href="https://wordpress.org/plugins/types/" target="_blank"><strong>Types</strong></a>. In this post, I&#8217;ll try my best to explain how they fare against each other, specifically on the way they handle CPTs (and custom taxonomies).  What I don&#8217;t intend to cover are extended features like user roles or data migration. Finally, there&#8217;s a bonus section about enhancing their functionalities.</p>
<h2>WordPress Pods plugin</h2>
<p><div class="full"><a href="https://wordpress.org/plugins/pods/" target="_blank"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6488" src="https://stampede-design.com/wp-content/uploads/2015/02/banner-772x2501.png" alt="Pods WordPress plugin" width="772" height="250" /></a></div></p>
<p>The CPT management screens in Pods are really well-done and user friendly. If you are new to the world of CPTs, Pods will present you with a gentle learning curve to get you up and running. When you create a new CPT or custom taxonomy, you immediately have access to the custom fields management panel within the same CPT or custom taxonomy edit page. This makes the whole process of managing the custom fields a breeze and feels natural.</p>
<p>These are the main strengths of Pods:</p>
<ol>
<li>Nice and intuitive user interface.</li>
<li>Large selection of custom field types.</li>
<li>You can add custom fields to custom taxonomies too.</li>
<li>Pods Template is an optional component you can enable in Pods to create templates for outputting Pods CPTs using magic tags and shortcodes all within WordPress without messing around with theme files.</li>
<li>You can create a custom Settings page for miscellaneous usage.</li>
</ol>
<p>The limitation of Pods based on my experience are:</p>
<ol>
<li>While you can create true parent-child (or one-to-many) relationships between Pods CPTs, the level of integration doesn&#8217;t appear to be truly seamless. For instance, in a property rental website <span data-dobid="hdw">presumably</span> you had setup a one-to-many relationship between two CPTs; Properties and Rentals. However when editing a Property record you cannot add new Rental records in the same screen.</li>
<li>Each CPT can only have one meta box named More Fields containing all the custom fields.</li>
<li>You cannot make basic fields like plain text repeatable which could be handy in certain scenarios. Fortunately multiple image uploads is still possible.</li>
</ol>
<h2>WordPress Types plugin</h2>
<p><div class="full"><a href="https://wordpress.org/plugins/types/" target="_blank"><img decoding="async" class="aligncenter size-full wp-image-6489" src="https://stampede-design.com/wp-content/uploads/2015/02/banner-772x250.png" alt="Types WordPress plugin" /></a></div></p>
<p>The Types plugin may not look as straightforward to use at first glance primarily because the CPT and custom fields are managed in different admin screens but once you get your head around this it actually opens up a new possibility of the things you can do.</p>
<p>These are the main strengths of Types:</p>
<ol>
<li>You can create true parent-child (or one-to-many) relationships between any CPTs or WP&#8217;s native objects with very seamless integration. For instance, in a property rental website <span data-dobid="hdw">presumably</span> you had setup a one-to-many relationship between two CPTs; Properties and Rentals. When editing a Property record you can quick-add new Rental records in the same screen. Additionally, you can also specify which fields should appear in the quick add form.</li>
<li>You can have as many meta boxes with custom headings and combination of custom fields in each CPT. Furthermore, the meta boxes support custom CSS so you can arrange certain fields in side-by-side fashion instead of one per row for instance. This creates a more intuitive editing experience for the end users.</li>
<li>All custom fields can be made repeatable.</li>
<li>Non-repeatable custom fields can be fine-tuned with conditional logic to control when they should appear based on the values of other fields.</li>
<li>Meta boxes and custom fields can be added to user profiles.</li>
<li>The equivalence of Pods Templates for Types is called Views. It is not free but certainly a lot more powerful.</li>
</ol>
<p>The limitation of Types based on my experience are:</p>
<ol>
<li>User interface can be a bit tricky to work with.</li>
<li>No custom field of type Relationship.</li>
<li>No way of adding custom fields to custom taxonomies.</li>
</ol>
<h2>Bonus: Advanced Custom Fields plugin</h2>
<p>In cases where I was using Types and needed to use the Relationship-type custom field, I usually resorted to the <a href="https://wordpress.org/plugins/advanced-custom-fields/" target="_blank">Advanced Custom Fields plugin</a>. It may sound like an overkill to use it solely for one purpose but the field provided by Advanced Custom Fields simply has the <a href="http://www.advancedcustomfields.com/resources/relationship/" target="_blank">perfect UI for a relationship-type field</a>. It is also far superior than what Pods provided by default.</p>
<p><div class="full"><img decoding="async" class="size-full wp-image-6495" src="https://stampede-design.com/wp-content/uploads/2015/02/relationship_input.jpg" alt="The perfect UI for a relationship-type field." /><p class="capt_block">The perfect UI for a relationship-type field.</p></div></p>
<p>As a matter fact, Advanced Custom Fields is by far the best custom fields plugin for WordPress. To unlock its full potential you need to purchase the Pro version though.</p>
<h2>Bonus: Codepress Admin Columns plugin</h2>
<p>When you are working with CPTs, the <a href="https://wordpress.org/plugins/codepress-admin-columns/" target="_blank">Codepress Admin Columns</a> plugin is quite simply the icing of the cake for all your hard work. The plugin allows you to customize table columns in the admin landing page of CPTs or any WP&#8217;s native objects. It fulfills a basic need that greatly enhances user experience when working with CPTs in the admin area.</p>
<p><div class="full"><img decoding="async" class="size-full wp-image-6498" src="https://stampede-design.com/wp-content/uploads/2015/02/admin-columns-demo.jpg" alt="WP Admin Columns demo" /><p class="capt_block">Custom table columns FTW!</p></div></p>
<p>Though this plugin has a Pro version, the free one is awesome enough in most cases.</p>
<h2>Conclusion</h2>
<p><a href="https://wordpress.org/plugins/pods/" target="_blank">Pods</a> and <a href="https://wordpress.org/plugins/types/" target="_blank">Types</a> are my two favorite custom post types solutions for WordPress. How I decide between them depends ultimately on individual project requirements but so far I tend to choose Types for complex projects that require post relationship. With a couple of amazing supporting plugins, you&#8217;ll be having a blast working with either anyway.</p>
<p>Have a nice day!</p>
<h3>Update (June 2015)</h3>
<p>For an in-depth look at the features and technical differences between popular WordPress CPT plugins, view this <a href="https://docs.google.com/a/stampede-design.com/spreadsheet/ccc?key=0AoY8IFUX301qdFhBaERLUEUwa3U0YjFYTnBmaU1mbmc#gid=3" target="_blank">awesome comparison matrix spreadsheet</a> by Scott Kingsley Clark and Matt Gibbs.</p>
<p>The post <a href="https://stampede-design.com/blog/wordpress-cpt-solutions-comparison-pods-vs-types/">WordPress CPT Solutions Comparison: Pods vs Types</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/wordpress-cpt-solutions-comparison-pods-vs-types/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>Responsive Bootstrap Push Menu Tutorial</title>
		<link>https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/</link>
					<comments>https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/#comments</comments>
		
		<dc:creator><![CDATA[Syazwan Hakim]]></dc:creator>
		<pubDate>Wed, 27 Aug 2014 16:16:22 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[mobile navigation]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://dev.stampedelabs.com/client/v3/wp/?p=5939</guid>

					<description><![CDATA[<p>Responsive Bootstrap Push Menu is a combination of Bootstrap &#038; jPushMenu plugin, for better viewing on mobile. Requiring HTML, CSS and Javascript, Syazwan shows the tutorial on how to achieve the effect.</p>
<p>The post <a href="https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/">Responsive Bootstrap Push Menu Tutorial</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Getting bored with the current responsive Bootstrap menu?</p>
<p>Or you simply don&#8217;t want to use Bootstrap 3 dropdown menu on mobile because the menu is just too tall?</p>
<p><div class="full"><img loading="lazy" decoding="async" width="463" height="392" class="size-full wp-image-5940" src="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-menu.png" alt="Bootstrap 3 Mobile Menu" srcset="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-menu.png 463w, https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-menu-300x254.png 300w" sizes="(max-width: 463px) 100vw, 463px" /><p class="capt_block">Bootstrap 3 Mobile Menu</p></div></p>
<p>Well, why don&#8217;t you try to use push menu for mobile instead?</p>
<p><div class="full"><img loading="lazy" decoding="async" width="474" height="490" class="size-full wp-image-5943" src="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu.png" alt="Bootstrap 3 Mobile Push Menu" srcset="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu.png 474w, https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu-290x300.png 290w, https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu-32x32.png 32w" sizes="(max-width: 474px) 100vw, 474px" /><p class="capt_block">Bootstrap 3 Mobile Push Menu</p></div></p>
<p>For this responsive bootstrap push menu tutorial, I&#8217;m using <a href="http://takien.github.io/jPushMenu/" target="_blank">Takien&#8217;s jPushMenu</a>. The tutorial shall require all the three big guns &#8211; HTML, CSS &amp; Javascript to make the push menu happen.</p>
<p>Before jumping to the tutorial, why don&#8217;t you check out these demos for <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-left.html">Left Overlay</a>, <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-left-push.html">Left Push</a>, <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-right.html">RightOverlay</a>, or <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-right-push.html">Right Push</a>?.</p>
<h2>Responsive Bootstrap Push Menu &#8211; HTML</h2>
<p>Here I am using default <a href="http://getbootstrap.com/components/#navbar" target="_blank">Bootstrap Navbar</a> with additional classes for push menu to work.</p>
<pre class="brush: jscript; title: ; notranslate" class="lead">&lt;pre&gt;
&lt;nav class=&quot;navbar&quot;&gt;
&lt;div class=&quot;container-fluid&quot;&gt;
&lt;!-- Brand and toggle get grouped for better mobile display --&gt;
&lt;div class=&quot;navbar-header&quot;&gt;&lt;button class=&quot;navbar-toggle&quot; type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#bs-example-navbar-collapse-1&quot;&gt; &lt;span class=&quot;sr-only&quot;&gt;Toggle navigation&lt;/span&gt; &lt;/button&gt; &lt;a class=&quot;navbar-brand&quot; href=&quot;#&quot;&gt;Brand&lt;/a&gt;&lt;/div&gt;

&lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
&lt;div id=&quot;bs-example-navbar-collapse-1&quot; class=&quot;collapse&quot;&gt;
&lt;ul class=&quot;nav&quot;&gt;
&lt;li class=&quot;active&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;dropdown&quot;&gt;&lt;a class=&quot;dropdown-toggle&quot; href=&quot;#&quot; data-toggle=&quot;dropdown&quot;&gt;Dropdown &lt;/a&gt;
&lt;ul class=&quot;dropdown-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Another action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Something else here&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;divider&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Separated link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;divider&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;One more separated link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;form class=&quot;navbar-form&quot;&gt;
&lt;div class=&quot;form-group&quot;&gt;&lt;input class=&quot;form-control&quot; type=&quot;text&quot; placeholder=&quot;Search&quot; /&gt;&lt;/div&gt;

&lt;button class=&quot;btn&quot; type=&quot;submit&quot;&gt;Submit&lt;/button&gt;&lt;/form&gt;
&lt;ul class=&quot;nav&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;dropdown&quot;&gt;&lt;a class=&quot;dropdown-toggle&quot; href=&quot;#&quot; data-toggle=&quot;dropdown&quot;&gt;Dropdown &lt;/a&gt;
&lt;ul class=&quot;dropdown-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Another action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Something else here&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;divider&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Separated link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;!-- /.navbar-collapse --&gt;&lt;/div&gt;

&lt;!-- /.container-fluid --&gt;&lt;/nav&gt;
&lt;/pre&gt;</pre>
<p>Based on the above html, added classes can be found on line 05 (<strong>toggle-menu menu-left push-body</strong>) and line 15 (<strong>cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left</strong>).</p>
<p>&nbsp;</p>
<p>The post <a href="https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/">Responsive Bootstrap Push Menu Tutorial</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/feed/</wfw:commentRss>
			<slash:comments>56</slash:comments>
		
		
			</item>
		<item>
		<title>Generating TaffyDB Data File from Google Sheets</title>
		<link>https://stampede-design.com/blog/generating-taffydb-data-file-from-google-sheets/</link>
					<comments>https://stampede-design.com/blog/generating-taffydb-data-file-from-google-sheets/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Wed, 30 Apr 2014 17:20:20 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[data tools]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[google sheets]]></category>
		<category><![CDATA[taffydb]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=5127</guid>

					<description><![CDATA[<p>Shaiful shares some cool coding tricks using Google App Scripts for converting tabular data from Google Sheets to the format understood by a Javascript database called TaffyDB.</p>
<p>The post <a href="https://stampede-design.com/blog/generating-taffydb-data-file-from-google-sheets/">Generating TaffyDB Data File from Google Sheets</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="lead"><em>A little introduction</em>; in one of our most recent Shopify customization projects involving a store selling Subaru vehicle parts, the client wanted to have a cascading dropdown list to filter the products displayed to the user based on the vehicle selected.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="306" height="337" src="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot_on_5.2.2014_at_4.22.10_PM.png" alt="Cascading dropdown list" class="size-full wp-image-5132" srcset="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot_on_5.2.2014_at_4.22.10_PM.png 306w, https://stampede-design.com/wp-content/uploads/2014/05/Screenshot_on_5.2.2014_at_4.22.10_PM-272x300.png 272w" sizes="(max-width: 306px) 100vw, 306px" /><p class="capt_block">The requirement: Cascading dropdown list</p></div></p>
<p>This being on Shopify, the only way to code this custom feature is by getting creative with Javascript. It was then when I discovered about <a href="http://www.taffydb.com" target="_blank">TaffyDB</a> as the medium to store the 100+ odd rows of vehicle data. I played around with some hard-coded sample data using TaffyDB (and jQuery) and managed to get the cascading dropdown to work properly in Shopify. <em>Perhaps the steps can be outlined in another blog post.</em></p>
<p>Now we move on to the main gist of this post. The client had the vehicle data populated nicely in Google Sheets. My next big task was to reformat these data to a TaffyDB-compatible data file. Below is a snapshot of the Google Sheet and the corresponding TaffyDB data, which is essentially a JS array of objects. The cool part is to automate this conversion process.</p>
<p><div class="full"><a href="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot_on_5.2.2014_at_4.13.06_PM.png" class="thickbox"><img decoding="async" src="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot_on_5.2.2014_at_4.13.06_PM-500x142.png" alt="Sample data in Google Sheet." class="size-blog_post_full wp-image-5151" /></a><p class="capt_block">Sample data in Google Sheet (click to enlarge)</p></div></p>
<pre class="brush: jscript; title: ; notranslate">
var car = TAFFY(&#x5B;
{year:&quot;2002&quot;, make:&quot;Subaru&quot;, model:&quot;WRX&quot;, trim:&quot;Sedan&quot;, bolt:&quot;5x100&quot;, e_family:&quot;EJ&quot;, e_code:&quot;EJ20&quot;}, 
{year:&quot;2002&quot;, make:&quot;Subaru&quot;, model:&quot;WRX&quot;, trim:&quot;Wagon&quot;, bolt:&quot;5x100&quot;, e_family:&quot;EJ&quot;, e_code:&quot;EJ20&quot;}, 
{year:&quot;2003&quot;, make:&quot;Subaru&quot;, model:&quot;WRX&quot;, trim:&quot;Sedan&quot;, bolt:&quot;5x100&quot;, e_family:&quot;EJ&quot;, e_code:&quot;EJ20&quot;}, 
{year:&quot;2003&quot;, make:&quot;Subaru&quot;, model:&quot;WRX&quot;, trim:&quot;Wagon&quot;, bolt:&quot;5x100&quot;, e_family:&quot;EJ&quot;, e_code:&quot;EJ20&quot;}
]);
</pre>
<p>Enter <a href="https://developers.google.com/apps-script/quickstart/macros" target="_blank">Google Apps Script</a>. This tool is a godsend because it allows you to use Javascript to programmatically manipulate data in your spreadsheet. To access Google Apps Script in Google Sheets, go to <i>Tools -&gt; Script Editor</i>.</p>
<p>After going through a few tutorials, I managed to come out with a fairly decent code for performing this conversion process.</p>
<pre class="brush: jscript; title: ; notranslate">
/**
 * Retrieves all the rows in the active spreadsheet that contain data and generate a TaffyDB data array from it
 */
function readRows() {
  var sheet = SpreadsheetApp.openById('SPREADSHEET_ID_HERE').getActiveSheet();   // The value of key= variable in the URL
  
  // This represents ALL the data
  var range = sheet.getRange(5, 1, 1000, 20);   // Starts reading from row #5 column #1 (cell A5). Read as far as 1000 rows and 20 columns (for future data entries).
  var values = range.getValues();
  var output = '';
  var index = &#x5B;];
  var row_array = &#x5B;];
  var row = &quot;&quot;;
  
  // The main loop that goes through each cell within the selected range. i is row, j is column
  for (var i in values) {
    var cell_array = &#x5B;];
    for (var j in values&#x5B;i]) {
      if(i == 0) {   // i == 0 is row #5, this is the column variable name
        if (values&#x5B;i]&#x5B;j]) {
          index.push(values&#x5B;i]&#x5B;j]);
        }        
      } else {   // car data starts at row #7 onwards
        if (values&#x5B;i]&#x5B;j]) {
          cell_array.push(index&#x5B;j] + ':&quot;' + values&#x5B;i]&#x5B;j] + '&quot;');   // compose the car data cell by cell for the current row
        }
      }
      
    }
    
    if(i &gt; 0) {
     if(cell_array.length &gt; 0) {
        row = cell_array.join(', ');   // join the individual cells car data for the current row with commas to form a complete row data
        row_array.push(row);
      }
    }
    
  }
  
  output = row_array.join('}, n{');   // join the individual rows with curly braces and commas to form a complete database

  output = 'var car = TAFFY(&#x5B;{' + output + '}]);';   // finalizing the TaffyDB format
  
  Logger.log(output);
  //return output;
};
</pre>
<p>To test this code out, simply enter your spreadsheet ID in line 5 and change the range number accordingly in line 8. The <em>Logger.log</em> command in line 44 is used for testing the output in the script editor console. In the production version, I have a few more extra codes to add a dropdown menu in the Google Sheets UI that users can click to download the updated TaffyDB JS data file and then simply drop it into Shopify.</p>
<p>The post <a href="https://stampede-design.com/blog/generating-taffydb-data-file-from-google-sheets/">Generating TaffyDB Data File from Google Sheets</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/generating-taffydb-data-file-from-google-sheets/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>CSS Sprite Technique</title>
		<link>https://stampede-design.com/blog/css-sprite-technique/</link>
					<comments>https://stampede-design.com/blog/css-sprite-technique/#comments</comments>
		
		<dc:creator><![CDATA[Sani Halid]]></dc:creator>
		<pubDate>Mon, 13 Jan 2014 10:22:31 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[sprites]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4647</guid>

					<description><![CDATA[<p>Learning new things and sharing what he has learned have always been exciting to Sani. Here he will show you how to produce CSS sliding door technique in his first ever tutorial in the blog.</p>
<p>The post <a href="https://stampede-design.com/blog/css-sprite-technique/">CSS Sprite Technique</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hello, Sani here. In my first ever tutorial post I am going to show you how to produce a CSS sprite technique.</p>
<h2>What is this CSS sprite technique &amp; why?</h2>
<p>CSS sprite, as interesting as it is called, is also an interesting CSS method itself. This approach involves changing an image to another different image, or the same image but different colour scape (greyscale, sephia etc.) upon hover.</p>
<p>The advantage of using the using css sprite technique is that the web page will automatically load all images at once, instead of one by one. This will speed up the loading time and there will be not much delay for users with slow Internet connection.</p>
<h2>But how?</h2>
<p>When we hover on the block, the background image will change smoothly to second image. If we use separate image for hover effect it will take time for website to load that image from server thus, will create ± 1 second empty space on hover. This will be a problem for user with slow internet connection.</p>
<h2>Interesting. Show me how.</h2>
<p>Here we go. Take a seat.</p>
<p>First of all, get any images or sprite to start. I would suggest an image with transparent background. In this tutorial I am going to use <a href="http://www.36peas.com/blog/2010/9/13/free-japanese-ninja-shinobi-sprite-sheet.html" target="_blank">this Ninja Sprite from 36peas</a>. Choose any two images &#8211; one for normal state and another for hover. Save them on some canvas by side or top and bottom.</p>
<p>Before we start, it&#8217;s a good idea to show some simple css background code.</p>
<p><div class="full"><img decoding="async" class="alignnone size-full wp-image-4662" src="https://stampede-design.com/wp-content/uploads/2018/02/css-background-value.jpg" alt="css background value" /></div></p>
<p>Single line css background code in correct order would be:</p>
<pre class="brush: xml; title: ; notranslate" class="lead">background: color position size repeat origin clip attachment image;</pre>
<p><div class="full"><img decoding="async" class="alignnone size-full wp-image-4669" src="https://stampede-design.com/wp-content/uploads/2018/02/ninja-sprite.jpg" alt="ninja sprite" /></div></p>
<p>In this image, each ninja will have <strong>width:227px</strong> and <strong>height:298px.</strong></p>
<p>Total width for both ninjas in one canvas would be <strong>width:454px</strong> and <strong>height:298px.</strong></p>
<p>In this tutorial we will only need a combination of three css background codes. Width and height set will just be for one image.</p>
<p>On hover, just change position of the image. Background image in this tutorial I put straight to image file. So the code should be like this:</p>
<p>Normal state:</p>
<pre class="brush: xml; title: ; notranslate">display:block;
height:297px;
width:227px;
background-position:0 0;
background-repeat:no-repeat;
background-image:url('ninja.
png');</pre>
<p>Hover state:</p>
<pre class="brush: xml; title: ; notranslate">background-position:-227px 0;</pre>
<p>Normal state in shortcut css:</p>
<pre class="brush: xml; title: ; notranslate">
display:block;
height:297px;
width:227px;
background:0 0 no-repeat url('ninja.png');</pre>
<p>Hover state in shortcut background css:</p>
<pre class="brush: xml; title: ; notranslate">background:-227px 0 no-repeat url('ninja.png');</pre>
<p>or</p>
<pre class="brush: xml; title: ; notranslate">background-position:-227px 0;</pre>
<p>If you would like to see how it looks like, you may view the demo links here:</p>
<ul>
<li><a href="http://jsfiddle.net/metalbesi/3YZWr/" target="_blank">normal/regular method</a></li>
<li><a href="http://jsfiddle.net/metalbesi/5sm6m/" target="_blank">shortcut background css</a></li>
</ul>
<p>Correct syntax for shortcut background css :</p>
<pre class="brush: xml; title: ; notranslate">background: color position size repeat origin clip attachment image;</pre>
<p>For background-position, always remember all browser read css background position code from x-axis to y-axis. In these examples:</p>
<ul>
<li>background-position:(x-axis)px (y-axis)px;</li>
<li>background-repeat: By default, all browser will use value &#8216;repeat&#8217;. To make it one image simply put &#8216;no-repeat&#8217;.</li>
</ul>
<p>There are some bits of notes about background-image: &#8211; back during my first time doing css background, it was a bit confusing to do relative path if the file images are in different folder.</p>
<p>Here are some examples to show what I meant:</p>
<p><div class="full"><img loading="lazy" decoding="async" width="206" height="176" class="alignnone size-full wp-image-4676" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.32.24-PM.png" alt="location-html-file" /></div></p>
<p>The location for the html file.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="230" height="188" class="alignnone size-full wp-image-4677" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.32.39-PM.png" alt="Screenshot on 1.3.2014 at 11.32.39 PM" /></div></p>
<p>The location for images and CSS folder.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="285" height="229" class="alignnone size-full wp-image-4678" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.34.29-PM.png" alt="Screenshot on 1.3.2014 at 11.34.29 PM" /></div></p>
<p>The location for the image file.</p>
<p>By default, the browser will find image in same folder where we save the CSS file. The solution for this problem would be that we have to jump outside the CSS folder by typing  &#8216; ../ &#8216; which means going back to one folder:</p>
<p><div class="full"><img loading="lazy" decoding="async" width="230" height="188" class="alignnone size-full wp-image-4677" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.32.39-PM.png" alt="Screenshot on 1.3.2014 at 11.32.39 PM" /></div></p>
<p>Here is an example based on my local html and css folder.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="285" height="229" class="alignnone size-full wp-image-4678" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.34.29-PM.png" alt="Screenshot on 1.3.2014 at 11.34.29 PM" /></div></p>
<pre class="brush: xml; title: ; notranslate">background-image:url('../art/ninja.png');</pre>
<p>Here are some links for you to play around:</p>
<ul>
<li><a href="http://www.w3schools.com/cssref/playit.asp?filename=playcss_background-position&amp;preval=10px%20200px" target="_blank">background-position:</a></li>
<li><a href="http://www.w3schools.com/cssref/pr_background-repeat.asp" target="_blank">background-repeat: </a></li>
<li><a href="http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_background_multiple" target="_blank">background-image:</a></li>
</ul>
<h2>Awesome! I am going to try now!</h2>
<p>Yay! And if you do have some questions, suggestions or examples, do drop them links in the comment.</p>
<p>(Thanks <a href="http://www.w3schools.com/cssref/css3_pr_background.asp" target="_blank">W3C</a> for being my main point of references.)</p>
<p>The post <a href="https://stampede-design.com/blog/css-sprite-technique/">CSS Sprite Technique</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/css-sprite-technique/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Add Product Sash/Ribbon in BigCommerce Using jQuery</title>
		<link>https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/</link>
					<comments>https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Mon, 23 Sep 2013 16:48:03 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[bigcommerce]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4472</guid>

					<description><![CDATA[<p>Shaiful understands product sashes are a nice touch for e-commerce websites, hence he is here to show you how to have it done.</p>
<p>The post <a href="https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/">Add Product Sash/Ribbon in BigCommerce Using jQuery</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Product sashes like On Sale, Bestseller and Sold Out are certainly a nice touch for any e-commerce websites, aesthetically as well as providing a positive user experience.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="655" height="259" src="https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM.jpg" alt="Sample of product sashes." class="size-full wp-image-4268" srcset="https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM.jpg 655w, https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM-300x119.jpg 300w" sizes="(max-width: 655px) 100vw, 655px" /><p class="capt_block">Sample of product sashes.</p></div></p>
<p>In BigCommerce, exclusive product sash features are not built-in but they can be added using some clever jQuery tricks. Specifically, we need to tell jQuery to read the page for certain &#8220;triggers&#8221; or &#8220;conditions&#8221; and show the appropriate sash based on them. The key to product sashes is they have to appear in product listing pages (like category, homepage, search result) and the product details page. This means the &#8220;triggers&#8221; have to be present in all these pages for jQuery to detect.</p>
<h2>On Sale Sash</h2>
<p>In the following example, I am going to show how to add the most common of all product sashes, On Sale. Firstly, we need to set the discounted price for the appropriate products. If this was done right, the products will show up in the shop with a strike-through line on their original retail price. This element will become the &#8220;trigger&#8221; for the On Sale sash. So we just have to tell jQuery, if this element exists, show the On Sale sash. Below are Javascript codes for the category and product details pages.</p>
<h4>Product Category Page</h4>
<pre class="brush: jscript; title: ; notranslate" class="lead">
$(&quot;#CategoryContent .ProductList li .RetailPriceValue&quot;).each(function( index ) {
   $(this).parents('li').find('.ProductImage').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/on-sale.png&quot; class=&quot;product-sash&quot; alt=&quot;On Sale&quot; /&gt;');
});
</pre>
<h4>Product Details Page</h4>
<pre class="brush: jscript; title: ; notranslate">
if($('.DetailRow.RetailPrice').is(':visible')) {
   $('.ProductThumbImage .zoomPad').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/on-sale.png&quot; class=&quot;product-sash&quot; alt=&quot;On Sale&quot; /&gt;');
}
</pre>
<h2>Any Miscellaneous Sashes</h2>
<p>A slightly trickier scenario is to show product sashes like Bestseller and New, which we don&#8217;t really have a way to configure via the BC admin. Even though BC has product tags and custom fields, these data don&#8217;t show up in the product category pages. Fortunately, we have something else to use, the main image alternate text. In BC admin, it&#8217;s the Description box of the main product image. You need to enter a unique identifying keyword in the Description box and thanks to jQuery, reading the presence of this keyword is a breeze. This method will allow you to show any kinds of product sashes.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="754" height="420" src="https://stampede-design.com/wp-content/uploads/2013/09/bc_admin_image_desc.png" alt="Enter the keyword into the Description field of the main image." class="size-full wp-image-4490" srcset="https://stampede-design.com/wp-content/uploads/2013/09/bc_admin_image_desc.png 754w, https://stampede-design.com/wp-content/uploads/2013/09/bc_admin_image_desc-300x167.png 300w" sizes="(max-width: 754px) 100vw, 754px" /><p class="capt_block">Enter the keyword into the Description field of the main image.</p></div></p>
<p>For showing a Bestseller sash, enter the keyword <em>Bestseller</em>. I personally prefer to enter the actual product name followed by the keyword to keep the semantics right, like <em>5ft Christmas Tree &#8211; Bestseller</em>. Here&#8217;s the code for showing the Bestseller product sash.</p>
<h4>Product Category Page</h4>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;#CategoryContent .ProductList li .ProductImage a img&#x5B;alt*='Bestseller']&quot;).each(function( index ) {
   $(this).parents('li').find('.ProductImage').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/best-seller.png&quot; class=&quot;product-sash&quot; alt=&quot;Bestseller&quot; /&gt;');
});
</pre>
<h4>Product Details Page</h4>
<pre class="brush: jscript; title: ; notranslate">
if(ProductImageDescriptions&#x5B;0] &amp;&amp; ProductImageDescriptions&#x5B;0].indexOf(&quot;Bestseller&quot;) &gt;= 0) {
   $('.ProductThumbImage .zoomPad').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/best-seller.png&quot; class=&quot;product-sash&quot; alt=&quot;Bestseller&quot; /&gt;');
}
</pre>
<p>The examples I provide here only contain the necessary jQuery code snippets to make the product sash works. It&#8217;s not really a step-by-step beginners tutorial. You would need CSS to style the product sash nicely. Don&#8217;t forget about the sash graphics too, they are transparent PNGs. I can also foresee that my codes are totally template-dependent. However, if you are familiar with jQuery selectors I am sure you will be able to understand the gist and tweak the codes accordingly to fit your templates. </p>
<p>Give it a try and post your feedback below!</p>
<p>The post <a href="https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/">Add Product Sash/Ribbon in BigCommerce Using jQuery</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
		<item>
		<title>How to Transfer Large Files Between Android Devices</title>
		<link>https://stampede-design.com/blog/how-to-transfer-large-files-between-android-devices/</link>
					<comments>https://stampede-design.com/blog/how-to-transfer-large-files-between-android-devices/#respond</comments>
		
		<dc:creator><![CDATA[Syazwan Hakim]]></dc:creator>
		<pubDate>Fri, 05 Jul 2013 21:02:53 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[file transfer]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[tech tips]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4296</guid>

					<description><![CDATA[<p>Android users - worry no more about sending those huge cat videos over between devices! Syazwan, our resident Android purist will show you how.</p>
<p>The post <a href="https://stampede-design.com/blog/how-to-transfer-large-files-between-android-devices/">How to Transfer Large Files Between Android Devices</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>These days, everything needs to work promptly &#8211; so I am pretty sure that you might have found yourself in a situation where you need to transfer big files (i.e 300MB file) between Android devices with less amount of time. These days, we know that those smartphones with <a href="http://en.wikipedia.org/wiki/Near_field_communication" target="_blank">Near Field Communication (NFC)</a> technology could do that easily for you.</p>
<p>But how about if you own one of those Android devices which don&#8217;t have NFC or the equivalent technology &#8211; for example Samsung Galaxy S2.</p>
<p>First off, you need to check if your device runs on Android version 4.0 above, because this is where <a href="https://play.google.com/store/apps/details?id=com.majedev.superbeam&amp;hl=en" target="_blank">SuperBeam</a> can perform the magic for you. While it is still using NFC to communicate, it is also offering another method to communicate between devices which is designed exclusively for devices that don&#8217;t have NFC.</p>
<h2>How does it work?</h2>
<p>You can use SuperBeam to scan QR code on other devices via SuperBeam app. It will communicate between devices using Wifi Direct once you scanned the QR code. This process is actually fully automatic without the need to do anything &#8211; not to mention it can share multiple files too! Imagine the convenience it offers.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="480" height="395" class="size-full wp-image-4312" alt="Qr-scanning-stampede" src="https://stampede-design.com/wp-content/uploads/2013/07/qr-scanning.jpg" srcset="https://stampede-design.com/wp-content/uploads/2013/07/qr-scanning.jpg 480w, https://stampede-design.com/wp-content/uploads/2013/07/qr-scanning-300x247.jpg 300w" sizes="(max-width: 480px) 100vw, 480px" /><p class="capt_block">Scanning QR Code to start communication</p></div></p>
<p><div class="full"><img loading="lazy" decoding="async" width="480" height="395" class="size-full wp-image-4313" alt="transfer-in-progress-stampede" src="https://stampede-design.com/wp-content/uploads/2013/07/transfer-in-progress.jpg" srcset="https://stampede-design.com/wp-content/uploads/2013/07/transfer-in-progress.jpg 480w, https://stampede-design.com/wp-content/uploads/2013/07/transfer-in-progress-300x247.jpg 300w" sizes="(max-width: 480px) 100vw, 480px" /><p class="capt_block">Transfer in progress</p></div></p>
<h2>Conclusion</h2>
<p>I have found that this app has been a great help especially when I need to transfer video or large images to other devices. It&#8217;s painlessly easy to use &#8211; just with simple tap, it will transfer your selected files for you within minutes. And yes, it is totally free!</p>
<p>Do you have any other method you use to transfer large files between your mobile devices?</p>
<p>The post <a href="https://stampede-design.com/blog/how-to-transfer-large-files-between-android-devices/">How to Transfer Large Files Between Android Devices</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/how-to-transfer-large-files-between-android-devices/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Speed Matters</title>
		<link>https://stampede-design.com/blog/speed-matters/</link>
					<comments>https://stampede-design.com/blog/speed-matters/#comments</comments>
		
		<dc:creator><![CDATA[Shen Chong]]></dc:creator>
		<pubDate>Thu, 06 Jun 2013 18:27:23 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[page speed optimisation]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web performance]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4053</guid>

					<description><![CDATA[<p>It is fairly unacceptable to have slow loading websites these days, so Shen decides to elaborate why speed matters and what we can do to speed things up.</p>
<p>The post <a href="https://stampede-design.com/blog/speed-matters/">Speed Matters</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We are currently in the great boom of Web 2.0 era. Websites have gone a long way since the Geocities days. Source code and asset files have gone bigger. Not to mention web developers spent hours deciding which file format to use just to squeeze down the file size so that the site could remain aesthetically pleasant yet fast. So why does speed <em>STILL</em> matter?</p>
<p><div class="full"><img decoding="async" class="alignnone" src="https://stampede-design.com/wp-content/uploads/2013/06/Flash_0069.jpg" /></div></p>
<p>Quoting a <a href="http://www.codinghorror.com/blog/2012/10/judging-websites.html" target="_blank">blogpost</a> about a research:</p>
<blockquote><p>Researchers led by Dr. Gitte Lindgaard at Carleton University in Ontario wanted to find out how fast people formed first impressions. They tested users by flashing web pages for 500 milliseconds and 50 milliseconds onto the screen, and had participants rate the pages on various scales. The results at both time intervals were consistent between participants, although the longer display produced more consistent results. Yet, in as little as 50 milliseconds, participants formed judgments about images they glimpsed. The &#8220;halo effect&#8221; of that emotional first impression carries over to cognitive judgments of a web site&#8217;s other characteristics including usability and credibility.</p></blockquote>
<p>Try clearing your browser cache and refresh your website, how long does it take to fully load? 2 seconds? 30 seconds?</p>
<p>If you are running a business on your site, potential customers might have already been turned off by the page load time. This might affect sales.</p>
<h2>So what can you do to speed up your site?</h2>
<p>Thankfully, there are a lot of great tools and solutions out there to help you optimize your site. For this post, I&#8217;ll introduce three techniques that I know of.</p>
<h3>Use a Content Delivery Network (CDN)</h3>
<p>Traditional server architecture is having your web hosting provider&#8217;s server serve up your website to the world wide web. Your website might load fast for users located near the server. But what if your most targeted customers or users span all across the other continents?</p>
<p>This is where CDN comes into play. CDN is a delivery network service. It is a service provider whereby they allow you to cache your site on their network of servers, at an affordable cost (some comes free) all over the world.</p>
<p>Big boys&#8217; sites like Google and Facebook have the power and funds to buy servers and have them setup personally all across the world. For personal or small business sites, CDN services are the way to go. Now you do not have to worry about choosing a hosting provider that is closer to home.</p>
<p>These CDN services also come with additional perks like analytics and security. Some claimed that the analytics data are more accurate than script-embedded services because CDN are the ones that serve the site. Also, you are protected up to the latest threats since your site is under their wing of networks.</p>
<h3>Minify all the things!</h3>
<p><div class="full"><img loading="lazy" decoding="async" width="300" height="225" class="alignnone size-medium wp-image-4055" alt="ZomboDroid06062013104020" src="https://stampede-design.com/wp-content/uploads/2013/06/ZomboDroid06062013104020-300x225.jpg" srcset="https://stampede-design.com/wp-content/uploads/2013/06/ZomboDroid06062013104020-300x225.jpg 300w, https://stampede-design.com/wp-content/uploads/2013/06/ZomboDroid06062013104020.jpg 552w" sizes="(max-width: 300px) 100vw, 300px" /></div></p>
<p>It is okay for your source code to have proper indentation and spacings during development phase. But in production environment, you&#8217;d better off getting your source code and asset files like CSS and javascripts minified to reduce their file size down to a significant level. This will not only save you on bandwidth cost but also speed up the site for first time visitor.</p>
<p>It is also advisable not to change your source code too often in production environment because visitors will have to load up new versions of the source code each time you make a small change. So unless we are talking about critical bugs in the site, update the site by a huge batch of changes. Make use of the browser caching ability.</p>
<h3>Analyze your site and further improve</h3>
<p>There are a couple of tools out there that can help you analyze your site and suggest ways on how to improve your site like Yahoo!&#8217;s YSlow. For me I use <a href="https://developers.google.com/speed/pagespeed/insights_extensions" target="_blank">Google&#8217;s PageSpeed extension</a>. Install it and start analyzing your site today &#8211; it is free. I was able to score up to 99/100 points in my recent optimization attempt.</p>
<p><div class="full"><img decoding="async" class="alignnone" alt="" src="https://pbs.twimg.com/media/BLjluClCUAAu2YY.png:large" /></div></p>
<p>The one point missing is from third party fonts that I have no control on improving.</p>
<p>One thing to note is that even though the analyzer is a great way on improving your site, you still need to consider each suggestion that were thrown at you carefully. Each site is built differently so 100 points should be an ideal target but not a must-attainable score.</p>
<h2>That is it!</h2>
<p>With the three solutions that I suggested, that should give you a general idea on how and why you should speed up your website. If you have any other alternatives, do comment below. I would love to hear about your optimization techniques. <a href="http://cdn.memegenerator.net/instances/400x/38446647.jpg" target="_blank"><em>Best siot</em></a>!</p>
<p>The post <a href="https://stampede-design.com/blog/speed-matters/">Speed Matters</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/speed-matters/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
