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
class Spree::RewardsRegistrationController < ApplicationController | |
def index | |
if !current_user | |
redirect_to spree.login_path | |
else | |
#render :text => "TEST ID" | |
user = Spree::User.find(Spree::User.current.id) | |
user.rewards ? @filled = true : @filled = false | |
end |
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
# /etc/nginx/sites-available/default | |
upstream my_site { | |
# fail_timeout=0 means we always retry an upstream even if it failed | |
# to return a good HTTP response (in case the Unicorn master nukes a | |
# single worker for timing out). | |
# for UNIX domain socket setups: | |
server unix:/tmp/my_site.socket fail_timeout=0; | |
} |
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
module Spree | |
Spree::Product.class_eval do | |
def self.getprods(params) | |
#get taxon_id from permalink | |
taxonid = params[:id].blank? ? nil : Taxon.find_by_permalink!(params[:id]).id | |
#keywords for paging | |
keywords = params[:keywords] | |
per_page = params[:per_page].to_i | |
per_page = per_page > 0 ? per_page : Spree::Config[:products_per_page] |
NewerOlder