Skip to content

Instantly share code, notes, and snippets.

<script>
function loadCollagePlusOverrides() {
$('.Collage').each(function() {
var collage = $(this);
// this allows you to change the loading effect of the images as they appear on the screen.
// default value is "effect-2". Possible options are "effect-1", "effect-2", "effect-3".
//// collage.attr("data-effect", "effect-2")
@nfriend21
nfriend21 / gist:423fd8780f8d19e3e5cf95bd76c4f56e
Last active March 15, 2017 19:27
new WP form for dynamic setting
<div id="asf_flash_container" class="asf-flash-container">
</div>
<div class="asf-standard-form-precontent">
<h1 class="">Request a Demo</h1>
<p> If you are an artist/photographer, please keep in mind that we only onboard 20 customers per month and are very selective about who we bring onboard. Therefore, if you cannot provide a valid phone number where we can contact you to discuss your art business, please do not request a demo.</p>
</div>
<div class="asf-standard-form-container">
Below are the variables that can be accessed within the <body> section of the Order Success page scripts.
{{ order.number }} => this will display the number of the order that is unique to your website (recommended).
{{ order.id }} => this will display the internal ID of the order, unique to Art Storefronts.
{{ order.total }} => this will display the grand total of the order, after shipping, taxes, etc.
{{ order.shipping_total }}
{{ order.tax_total }}
Here is an example of how a third party website called "shareasale.com" needs to track order data.
@nfriend21
nfriend21 / blog
Last active August 30, 2017 22:59
<div class="focus-footer">
<h2>Want to Sell More Art Online?</h2>
<p>We help artists get more consistent art sales. [thrive_2step id='4209']<a>Click here to request a demo </a>[/thrive_2step] and one of our representatives will contact you to conduct a 10 minute introductory call, to see if there is a fit for both sides.</p>
<h2>Still Not Convinced?</h2>
<p>Perhaps you need some better stats or some more information? Fair enough.
<br /><br />
<a href="http://blog.artstorefronts.com/selling-art/" target="_blank" rel="noopener">I am an artist / photographer. <br />Tell me more about selling art online</a></p>
<h2>What is Art Storefronts?</h2>
<p>Did you know Art Storefronts has over 2,000 professional artists and photographers, and more than 300 art galleries and high-profile museums using our platform to sell art online? <a href="http://blog.artstorefronts.com/about/" target="_blank" rel="noopener">Learn More About Art Storefronts &gt;&gt;</a></p></div><hr><h2>Popular Posts</h2><div class="thrv_wrapper thrv_po
class OrderAssetsZipDownloadCreator
def self.build(order_id, force = false)
@order = Order.find(order_id)
@force = force
unless @order.download_zip_url.present? #prevent duplicate images from being added to zip.
reupload_assets_with_tag
#create_zip
end
class OrderAssetsZipDownloadCreator
def self.build(order_id, force = false)
@order = Order.find(order_id)
@force = force
unless @order.download_zip_url.present? #prevent duplicate images from being added to zip.
reupload_assets_with_tag
#create_zip
end
// Cloudinary jQuery integration library uses jQuery File Upload widget
// (see http://blueimp.github.io/jQuery-File-Upload/).
// Any file input field with cloudinary-fileupload class is automatically
// wrapped using the File Upload widget and configured for Cloudinary uploads.
// You can further customize the configuration using .fileupload method
// as we do below.
function uploadToCloudinary(form) {
var uploadButton = $(form).find('.cloudinary-fileupload'),
uploadLimit = 50000000,
<%= cl_image_upload_tag(:picture,
:html => { :multiple => true },
:image_metadata => true,
:exif => true,
:flags => "keep_iptc",
:use_filename => true,
:eager_async => true,
:eager => [
{ :format => 'jpg',
{
"11722" => {
"8x10" => "149.88",
"8x12" => "129.06",
"8x24" => "155.16",
"8x40" => "165.59",
"10x10" => "149.9",
"11x14" => "149.9",
"12x12" => "167.27",
"12x16" => "171.75",
#<ArtUploadStore id: 1255, page_id: 34697, default_medium_id: nil, display_artist_names: false, default_style_finish: nil, frame_insets: {}, watermark_avail: false, watermark_picture: nil, canvas_overlay_avail: false, canvas_overlay_picture: nil, personalization: {"shopping_tabs"=>{"tab1_text"=>"1 Medium", "tab1_tooltip"=>"first, choose a medium", "tab2_text"=>"2 Size", "tab2_tooltip"=>"then, choose a size", "tab3_content"=>{"canvas_options_label_text"=>"Canvas Options", "color_label_text"=>"Color", "finishing_label_text"=>"Finishing", "additional_options_label_text"=>"Additional Options"}, "tab3_text"=>"3 Styles", "tab3_tooltip"=>"then, choose your styles", "tab4_text"=>"4 Frame", "tab4_tooltip"=>"choose a frame", "tab5_content"=>{"summary_label_text"=>"Summary", "add_a_message_label_text"=>"Add a Message"}, "tab5_text"=>"<i class=\"fa fa-shopping-cart\"></i>", "tab5_tooltip"=>"review and confirm"}}, copyright_text: "", copyright_tooltip: "", display_cropper: true, display_crop_teaser_pricing: false, crop_si