This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Dimensions } from 'react-native'; | |
/** | |
* Wrap a style rule in this responsive function to process dimensions | |
* @param {object} Object of queries containing style objects | |
*/ | |
const responsive = (queries, dim = 'window') => { | |
const { width, height } = Dimensions.get(dim); | |
let styles = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ShoppSampleHandler { | |
function __construct() | |
{ | |
// If the sample post/get variable exists | |
if( isset($_REQUEST['sample-request']) ) | |
{ | |
// Hook into the action which adds it to cart | |
add_action( 'shopp_cart_before_add_item', array( &$this, 'manipulateSampleInfo' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Simply include this file from your functions.php within your WordPress theme, do everything else as you would! | |
*/ | |
if( ! class_exists('acf_shopp_category') ) : | |
class acf_shopp_category { | |
function __construct() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WJB - Order Samples in Magento 1.8 | |
* | |
* Upload this file to the root of your Magento installation and then you will | |
* need to add the following snippet to your 'template/catalog/product/view.phtml' | |
* | |
* You may need to change some of the values below in the sample creation code | |
* but this is all commented so it should be simple enough - my advice would be | |
* to read through and edit where necessary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/ | |
* | |
ADD THIS CODE TO YOUR FUNCTIONS.PHP | |
*/ | |
add_action('shopp_init', 'shopp_cart_shipping_handling'); | |
function shopp_cart_shipping_handling( ) | |
{ | |
if ( array_key_exists('shipmethod', $_POST) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_featured_products() | |
{ | |
global $wpdb; | |
$the_products = array(); | |
$products = $wpdb->get_results("SELECT product FROM {$wpdb->base_prefix}shopp_summary WHERE featured = 'on'"); | |
foreach($products as $product) | |
{ | |
array_push($the_products, shopp_product($product->product)); | |
} | |
return $the_products; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//ADD RULE TO SECTION | |
add_filter('acf/location/rule_types', 'acf_location_rules_types'); | |
function acf_location_rules_types( $choices ) | |
{ | |
$choices['Other']['taxonomy_depth'] = 'Taxonomy Depth'; | |
return $choices; | |
} | |
//MATCHING OPERATORS |