Title Replies Last Post
Introducing Shopify Scripts: Customize the business logic of your Shopif...

Shopify's Script Editor allows you to create Ruby scripts that can change the prices and properties of line items in your store's cart. Using scripts, you can create discounts that will be applied automatically based on the items and properties of a cart. The Script Editor app adds a place to write and store scripts in your Shopify admin. This forum is for questions and discussion surroundin...

Jan 26 2017 by Charlie
Shopify Scripts: Read before posting

This category in the forums is dedicated to the Shopify Script Editor. Please ensure your question relates to the Scripts API or the Script Editor app. Documentation: Shopify Scripts API Shopify Script Editor app App store: Script Editor If you have general API questions unlrelated to Shopify Scripts post in the Shopify APIs & SDKs category. If your question is about storefront ...

Feb 7 2017 by Jason
How To Hide Script On Mobile

Hey, does anyone know how to hide something on mobile in the CSS file? This is the code, but I only want it to show on desktop, not on mobile. How do I do that?   <div id="zergnet-widget-10487"></div> <script language="javascript" type="text/javascript">     (function() {         var zergnet = document.createElement('script');         zergnet.type = 'text/javascrip...

Yesterday by Matt
Display only one tag that contains specific prefix

{% assign productTags = product.tags | downcase %} {% if productTags contains 'prefix_' %} {{productTags}} {% endif %}   Hello,   I am looking for solution about to display only one tag which contains a specifi prefix insted of displaying all tags. The above tag display all tags while i want to display only that tag which has a specific prefix.   Thanks

Mar 23 2017 by Athar Rasheed
Script errors not consistent

I have two Shopify stores. I've created a script to apply a 25% discount if the customer is tagged with "employee". The script works on one of the stores, but generates an error on the other. part of my script: customer = Input.cart.customer CAMPAIGNS = [ if customer.tags.include? "employee" ItemCampaign.new( AndSelector.new( ExcludeGiftCardSelector.new, ...

Mar 23 2017 by Clarke Barry
How to edit Reviews App settings

Hi I need to remove the reviews on my products that do not currently have reviews. How do I do this please? And products that have 1 review still show an empty product review how can i remove this?

Mar 22 2017 by Limepixel
Identifying scripted discounts in order admin

I have been asked by the accountant here: is there a way to identify Line Items that have had scripted discounts applied, either using tags or line item properties? Are scripts able to write values to either of those? 

Mar 11 2017 by Jason
Include messages through Script editor

Hey there, I made a really simple code to let know the costumers how much left they have to get free shipping, it goes just like this. price = Input.cart.subtotal_price price_for_freeshipping = Money.new(cents: 5500) if price < price_for_freeshipping resto = price_for_freeshipping - price message1 = "Te quedan #{resto} para que tu pedido sea gratuito" puts "Faltan #{...

Mar 9 2017 by Northweek Webmaster
Free Shipping

How do I apply free shipping if cart total is 75?

Mar 8 2017 by Lita
Can the script only run if I am using a certain theme?

I would like the have scripts only work on certain theme. Can the script only run if I am using a certain theme?

Mar 8 2017 by Jason
Metafields information display in Product.Liquid?

Please help. Can'd display metafields informatino in the theme liquid pages. What I'm doing: Using API to publish a product, that contains a "metafield" with array of object data. In my theme, product.liquid showing data with code: {{ product.metafields.global.colour }}  Output: blank, nothing Expected Output: "Black"  Example Metafield data: ["metafield"]=> ar...

Mar 7 2017 by Sam R
Prevent Discount Codes from Being Used on Certain Products

Hey everyone!  We're trying to use Shopify Scripts to prevent discount codes from being applied to items that are already on sale (i.e. have a Discount code that applies to them), so that customers can't get a double sale. When we put an item on sale we update the variant price to the sale price, and set the original price in the "compare_at_price". Additionally, it is tagged as "On Sale". S...

Mar 6 2017 by Jurgen Feuchter

Hello everyone, is there a way to reset/clear the previous product type and product tags? I want to start fresh with ym Product Type and Product tags without having the olds one in there. Thanks for any assistance.   Jasen

Mar 6 2017 by jasenbeast
Size option taking very long to load

Hello,   Recently my website has been having problems where it is taking the "Size" option on the product pages to load very slowly, causing customers to think it simply is not showing up at all. I have no idea why this is, but it should be noted that this started when I upgraded to the Automatically Calculated Shipping option offered by Shopify. According to this speedtest that Shopif...

Mar 5 2017 by Steven Mena
When discount code is used get free shipping

Is it possible to grant free shipping when a certain discount code has been used?

Feb 24 2017 by Jason
Moderators, please!?

This forum is getting polluted with inane chaff from dumbos that don't know better... can we get some threads moved / crufted and maybe some clearer explanation, maybe even some rules on entering ... Plus-only store owners / partners?

Feb 17 2017 by HunkyBill
Signing/Hashing Inside Scripts

I'm trying to write a script that allows bundle pricing, something like: Product A costs $100 Product B costs $200 Product A costs $75 if B is in the cart Product B costs $150 if A is in the cart Writing the above script is fairly straightforward, but gets difficult to manage as soon as you start adding a few more combinations and permutations. We have an outside server that can han...

Feb 8 2017 by Dev Gupta
Change original_line_price?

I am trying to set up tiered pricing on a store using Scripts. When a product goes on sale, we need to calculate the discount based on the compare at price, not the sale price. No problem there. But this also means, the original line price needs to be re-calculated based on the compare price. I tried simplying reassigning the line_item.original_line_price but I got an error (undefined method). ...

Feb 2 2017 by Michael Sunarlim
Set Static Price By Tag, Script not working, not sure what I'm missing

Hey all,  So this is what I have so far, but it's not seeming to work, I'm trying to set items with a specific tag to $50   class StaticPrice def initialize(selector) @selector = selector end class TagSelector def initialize(tag) @tag = tag end def match?(line_item) line_item.variant.product.tags.include?(@tag) end end CAMPAIGNS = [ StaticPrice....

Jan 23 2017 by HunkyBill
Using Money in the message of a discount script

One of the discounts I'm working on takes off $0.75 per item. I'd like to tell the customer their total savings in the message string. This works fine, but right now if the person saved $7.50 it says, "You saved $7.5!" I'd like it to say, "You saved $7.50!" or "You saved $8.25" or "You saved $3.00" or any other variation. Right now, If I add a value that is a money object I get this: "You sa...

Dec 28 2016 by HunkyBill