Code Monkey home page Code Monkey logo

sg-motorsport's Introduction

SG-Motorsport

screenshot

  • Contributors: bobbingwide, Stephen Goodyear
  • Donate link: https://www.oik-plugins.com/oik/oik-donate/
  • Tags: e-commerce, responsive-layout, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, post-formats, rtl-language-support, sticky-post, threaded-comments
  • Requires at least: 4.9.8
  • Tested up to: 4.9.8
  • Version: 0.0.4
  • License: GPLv2 or later
  • License URI: https://www.gnu.org/licenses/gpl-2.0.html

WordPress child theme of WooCommerce's Storefront theme, for SG Motorsport

Description

Implemented on sgmotorsport.biz

Installation

  1. Install the Storefront parent theme
  2. Download the SG-Motorsport child theme
  3. Install the SG-Motorsport child theme
  4. Activate the SG-Motorsport child theme
  5. Navigate to Appearance > Customize in your admin panel and customize to taste.
  6. Optionally, install, activate and configure plugins from the WooCommerce Storefront Extensions Bundle.
  7. Optionally, install, activate and configure other WooCommerce related plugins.

Change Log

0.0.4

  • Added: Implement quantity field for home and shop page #3
  • Changed: Improved styling for iPhone 4s #1

0.0.3

  • Added: Support co-existence of [bw_contact_form] with Easy WP SMTP #2
  • Added: screenshot.png
  • Changed: Improve styling for tel and email in mega menu and footer bar
  • Changed: Hide h1 in product display
  • Changed: Don't display Tags in single-product meta
  • Fixed: Remove logic to enqueue child theme stylesheet. It's done automatically

0.0.2

  • Changed: Improve formatting of Customer services telephone
  • Changed: Custom styling for the Product Categories widget
  • Added: Styling for the widgets in the mega menu
  • Noted: Experimented with filters to set the mega menu background colour
  • Changed: Hide the word 'Menu' for the hamburger menu

0.0.1

  • Tested: with Storefront 2.3.3
  • Tested: with WooCommerce 3.4.5
  • Tested: with WordPress 4.9.8
  • Tested: with PHP 7.1

Copyright

(C) Copyright Bobbing Wide 2018

  • This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Notes

SG-Motorsport does not bundle Third Party Resources. Dependent upon the Storefront theme and WooCommerce. Relies on the existence of some plugins and the absence of others.

sg-motorsport's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar

sg-motorsport's Issues

Create new theme to replace Canvas

Canvas is being replaced by Storefront. We need to create a new child theme using Storefront as the template.

Requirements

  • Support shortcodes
  • Support checkout customisations - currently implemented using a plugin
  • Needs custom CSS for responsive styling of extension plugin components.
  • Needs custom CSS for styling on the iPhone 4S and other small devices

If required,

  • Support caching and optimisation plugins

Support co-existence of [bw_contact_form] with Easy WP SMTP

Requirement

Use [bw_contact_form] shortcode in conjunction with easy-wp-smtp.

Explanation

The Easy WP SMTP plugin overrides the from email address (and optionally name) with its own value.
This means that the email sent using [bw_contact_form] does not contain the form submitter's email address. Obviously this information is needed in order to construct a reply.

Solution

Include the following code in functions.php

add_filter( 'bw_email_message', 'sgm_bw_email_message', 11, 2 );
/**
 * Appends From email and contact name to the contact form message
 * 
 * Needed since easy-wp-smtp overrides the From email address.      
 * Since we're in the 'bw_email_message' filter we expect bw_replace_fields to be available.
 *  
 * @param string $message the email content
 * @param array $fields array of name value pairs
 * @return string updated message 
 */
function sgm_bw_email_message( $message, $fields ) {
	bw_trace2();
	$extra_bits = bw_replace_fields( "<br />From: %from%<br />Name: %contact%", $fields );
	$message .= $extra_bits;
	return $message;
}

Implement quantity field for home and shop page

We need to continue to support the ability to choose the quantity when adding to the cart from the home or shop page.

Current implementation

https://github.com/bobbingwide/woocommerce-thumbnail-input-quantities
doesn't actually work. It displays the quantity field but doesn't pass the value through.

Proposed solution

https://wordpress.org/plugins/quantity-field-on-shop-page-for-woocommerce
works. But

  • it produces Notices when WP_DEBUG true
  • it has more code than we need

So, rather than change it, we can just copy the relevant code to the child theme.

Since in the current implementation the add to cart functionality takes the user to the Shopping cart
we don't need any special AJAX logic to update the values or messages on the current page.
So all we need to do is to implement the logic for the filter 'woocommerce_loop_add_to_cart_link.

The wordpress.org plugin called quantity-field-on-shop-page-for-woocommerce

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.