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
# Shell prompt based on the Solarized Dark theme. | |
# Screenshot: http://i.imgur.com/EkEtphC.png | |
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM='gnome-256color'; | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM='xterm-256color'; | |
fi; |
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
SELECT `COLUMN_NAME` | |
FROM `INFORMATION_SCHEMA`.`COLUMNS` | |
WHERE `TABLE_SCHEMA`='yourdbname' | |
AND `TABLE_NAME`='yourtablename'; |
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
SELECT | |
c.title as category_title, | |
c.url_title as category_url_title, | |
c.image as category_image | |
FROM | |
exp_br_category c, | |
exp_br_product_category pc | |
WHERE | |
c.parent_id = 93 | |
AND |
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 _producttype_multiselect($product_id,$attribute_id,$title,$label,$required,$val,$opts = ''){ | |
$class = ($required == 1) ? 'required' : '' ; | |
$input_title = ($required == 1) ? $label.' '.lang('br_is_required') : $label ; | |
$options = ''; | |
##### BEGIN PATCH: ADD THIS BELOW THE OPTIONS VARIABLE ###### | |
// Check to make sure the value is not serialized | |
$data = @unserialize($val); |
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
find . -name *.DS_Store -type f -exec rm {} \; |
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
{exp:query sql=" | |
SELECT | |
title as category_title, | |
url_title as category_url_title, | |
image as category_image, | |
FROM exp_br_category, | |
WHERE parent_id = 0 | |
ORDER BY sort | |
"} |
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
{exp:brilliant_retail:js} | |
var price,newPrice,qty,opt,adj; | |
$(function(){ | |
price = parseInt($('p.price').html().replace('$',''))*1; | |
$('select','.product-options') | |
.change(function(){ | |
qty = $('option:selected','#qty_select').val(); | |
newPrice = price; |
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
UPDATE exp_extensions SET priority = 99 WHERE class = 'Brilliant_retail_ext' AND method = 'br_template_post_parse'; |
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 _search_index($queryStr){ | |
// Need at least 3 characters for wildcard searches | |
if(strlen($queryStr) >= 3){ | |
// Dashes don't play nicely with our wildcard search | |
$queryStr = str_replace("-"," ",$queryStr).'*'; | |
} | |
ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.PATH_THIRD.'brilliant_retail'.DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.PATH_SEPARATOR); | |
include_once(PATH_THIRD.'brilliant_retail'.DIRECTORY_SEPARATOR.'core'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'Zend'.DIRECTORY_SEPARATOR.'Search'.DIRECTORY_SEPARATOR.'Lucene.php'); | |
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive()); |
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 _validate_promo_code($code){ | |
if($code["enabled"] == 0){ return false; } | |
if($code["uses_per"] > 0){ | |
$cnt = $this->EE->promo_model->get_promo_use_count($code["code"]); | |
if($cnt >= $code["uses_per"]){ | |
return false; | |
} | |
} |
NewerOlder