User Tools

Site Tools


ecommerce:toward_a_woocommerce_store

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
ecommerce:toward_a_woocommerce_store [2021/10/20 23:25] mithatecommerce:toward_a_woocommerce_store [2021/10/30 00:44] – [WooCommerce payments] mithat
Line 4: Line 4:
  
 ===== Theme ===== ===== Theme =====
-To get the presentation I wanted with the [[https://wordpress.org/themes/storefront/|Storefront]] theme, I had to make a child theme from it and make some changes. In particular, I wanted to change the brand typogrpahy, use a different shopping cart icon, and use a copyright notice that was better suited for purpose. That meant changing the [[Storefront child theme style.css]] and [[Storefront child theme functions.php]] files using the Theme Editor.+To get the presentation I wanted with the [[https://wordpress.org/themes/storefront/|Storefront]] theme, I had to make a child theme and make modifications. In particular, I wanted to:
  
-==== style.css ====+  * Change the brand typogrpahy. 
 +  * Use a different shopping cart icon. 
 +  * Remove categories from the navigation. 
 +  * Use a copyright notice that was better suited for purpose.
  
-<file css style.css+This meant changing the [[Storefront child theme style.css|style.css]] and [[Storefront child theme functions.php|functions.php]] files for the child theme using the Theme Editor.
-/* +
-Theme Name: Mithat'Storefront Child +
-Theme URI: n/a +
-Description: Storefront modified by mfk. +
-Author: Automattic/mfk +
-Author URI: https://mithatkonar.com +
-Template: storefront +
-Version: 0.1.+
-*/+
  
-/* make the brand bigger. */ +===== Plugins =====
-.site-branding .site-title { +
-  /*font-size: 2.8em;*/ +
-  /*letter-spacing: -0.06em;*/ +
-  font-size: 1.6em;  +
-  letter-spacing: -0.03em; +
-  line-height: 0.9em; +
-}+
  
-/* change bag icon to cart, from */ +I have the following plugins activated: 
-/* https://themebynumbers.com/2017/07/04/storefront-change-the-basket-to-a-cart/ */ +  [[https://wordpress.org/plugins/woocommerce/|WooCommerce]] (duh). 
-.site-header-cart .cart-contents:after, +  [[https://wordpress.org/plugins/jetpack/|Jetpack]], because WooCommerce requires it. Yay :-\. 
-.storefront-handheld-footer-bar ul li.cart > a:before { +  * [[https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/|WooCommerce PDF Invoices & Packing Slips]]. I'm not sure if this came with the default WooCommerce install. 
-  content: "\f07a"; +  [[https://wordpress.org/plugins/woocommerce-services/|WooCommerce Shipping & Tax]]. Ditto. 
-}+  * A WooCommerce checkout gatewayThe checkout gateway I originally set up is being discontinued, so it will need to be changed. Yay :-\. See below. 
 +  * [[https://wordpress.org/plugins/wp-mail-smtp/|WP Mail SMTP]], so I can send email using my Gmail/G Suite accountThis worked fine when I first set it up, but changes in Google authentication mean I have to jump through some more hoops to get things to work. Yay :-\. 
 +  * [[https://wordpress.org/plugins/wpforms-lite/|WPForms Lite]]. I don't know how useful this will be. 
 +  * [[https://wordpress.org/plugins/really-simple-ssl/|Really Simple SSL]]. 
 +  * [[https://wordpress.org/plugins/updraftplus/|UpdraftPlus - Backup/Restore]], as a backup solution. 
 +  * [[https://wordpress.org/plugins/homepage-control/|Homepage Control]]. I'm not sure I actually use this. Also it "has not been tested with your current version of WordPress.Yay :-\. 
 +  * [[https://wordpress.org/plugins/classic-editor/|Classic Editor]], because the new Gutenberg block editor kinda sucks. 
 +  * [[https://wordpress.org/plugins/restore-classic-widgets/|Restore Classic Widgets]], ditto.
  
-/* remove homepage categories title*/  +This is a fair amount of surface that could become problematic (e.g., becomes abandonware, develops security issues, etc.). Jetpack is freemium SAAS with a FOSS client. I haven't vetted the licensing of the other plugins for FOSS compliance.
-.storefront-product-categories .section-title {display:none;}+
  
-</file>+===== Payment Gateways ===== 
 +The following are some candidates.
  
-==== functions.php ==== +==== WooCommerce payments ==== 
-Hack to get the copyright line to appear as I want.+  * [[https://woocommerce.com/products/woocommerce-payments/?quid=dcfcf09b19a901ed8c5d0e8c548e52f7|WooCommerce]] 
 +  * [[https://wordpress.org/plugins/woocommerce-payments/|WordPress]] 
 +  * By WooCommerce. 
 +  * 2.9% + $0.30 USD per transaction for U.S. issued card. 
 +  * 3.5 stars on WordPress out of ~20 reviews. 
 +  * No rating on WooCommerce.
  
-<file php functions.php> +==== Stripe ==== 
-<?php +  * [[https://woocommerce.com/products/stripe/?quid=bf2c2dc2ae88c615ec79f71d416b028e|WooCommerce]] 
-// Exit if accessed directly +  * [[https://wordpress.org/plugins/woocommerce-gateway-stripe/|WordPress]] 
-if ( !defined'ABSPATH' ) exit;+  * By WooCommerce. 
 +  * 2.9% + 30¢ per successful card charge (from [[https://stripe.com/pricing|here]])
 +  * 3 stars on WordPress out of 100+ reviews. 
 +  * 3.5 stars on WooCommerce out of ~75 reviews.
  
-// BEGIN ENQUEUE PARENT ACTION +==== Square ==== 
-// AUTO GENERATED - Do not modify or remove comment markers above or below: +  * [[https://woocommerce.com/products/square/?quid=bf2c2dc2ae88c615ec79f71d416b028e|WooCommerce]] 
- +  [[https://wordpress.org/plugins/woocommerce-square/|WordPress]] 
-// END ENQUEUE PARENT ACTION +  By WooCommerce
- +  2.9% + 30¢ (from [[https://squareup.com/us/en/payments/our-fees|here]]). 
-/* +  1.5 stars on WordPress out of ~75 reviews. 
- * MFK Storefront customizations +  No rating on WooCommerce.
- * Mithat Konar +
- */ +
- +
-/* Replace copyright info*/ +
-//storefront_credit is a "pluggable" function +
-function storefront_credit() { +
-    ?+
-        <div class="site-info"> +
-            Copyright &copy 2018-2021 Mithat Konar. All rights reserved.        +
-        </div> +
-    <?php +
-+
- +
-/Disable different address checked by default. +
- * From https://metorik.com/blog/change-woocommerce-ship-to-a-different-address-default +
- Doesn't work with zones very well+
- *+
-//add_filter( 'woocommerce_ship_to_different_address_checked', '__return_false' ); +
- +
-/* Number of categories on homepage*/ +
-add_filter('storefront_product_categories_shortcode_args','custom_storefront_category_per_page' ); +
-function custom_storefront_category_per_page( $args ) { +
- $args['number'] = 2; +
- $args['columns'] = 2; +
- return $args; +
-+
- +
-/* Change titles of homepage sections */ +
-// Featured products +
-add_filter( 'storefront_featured_products_args', 'custom_storefront_product_featured_title'); +
-function custom_storefront_product_featured_title( $args ) { +
-    $args['title'] = __( 'Featured products', 'storefront' ); +
-    return $args;   +
-+
- +
-// Recent (new) products title +
-add_filter( 'storefront_recent_products_args', 'custom_storefront_product_recent_products_title'); +
-function custom_storefront_product_recent_products_title( $args ) { +
-    $args['title'] = __( 'New products', 'storefront' ); +
-    return $args;   +
-+
- +
-/* Fonts */ +
-// From http://www.fix-css.com/2016/09/remove-google-fonts-form-woo-storefront-theme/ +
-// Remove Google Font from Storefront theme +
-/* +
-function iggy_child_styles() { +
-    wp_dequeue_style('storefront-fonts')+
-    add_filter( 'storefront_google_font_families', 'my_font_families' ); // mfk to add desired fonts back in +
-    wp_enqueue_style('storefront-fonts');                                // mfk to add desired fonts back in +
-+
-add_action( 'wp_enqueue_scripts', 'iggy_child_styles', 900); +
-*+
- +
-// If you just need to change Google font from default one, you may use the snippet taken from here. +
-/* +
-add_filter( 'storefront_google_font_families', 'my_font_families' ); +
-function my_font_families( $family ) { +
-    //$family = [];    // mfk to get rid of Source Sans Pro, which isn't gotten rid of anyway though it's not in HTML  +
-    $family['merienda'] = 'Merienda:400,700'; +
-    return $family; +
-} +
-*+
-</file>+
ecommerce/toward_a_woocommerce_store.txt · Last modified: 2021/10/30 00:48 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki