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...

6
May 13 2016 by Paul L. Newton
Converting Money to integer?

Hi all, First of all, this scripts editor is fantastic. As new features are added this thing is going to get super super cool. So my question: Can the money object be converted to an integer count of cents so I can do comparisons? For example, to determine if a line price in cents is greater than a previously calculated integer? Thoughts?

1
Today by Joseph Bergdoll
Add Item To Cart with Coupon Code

Hello — New scripts user here with a client who has newly joined Shopify Plus. The client likes to offer coupon codes that result in customers receiving a pre-specified free product. We want to be able to add that free product to the user's checkout once the proper discount code has been added, so that way they can have an exact preview of what they will be receiving. When speaking wit...

0
Today by Joseph Bergdoll
How to create custom coupon code - with special conditions and amount

Hi guys, I have to convert all Magento functions to Shopify Plus and I am going to create a private app for my partner store. How I can create custom coupon code with alot of sepecial condtions. Example : I need to create : coupon code : CUSTOMCODE1 -  If buy 3 product in collection 1 - except product name X and Y and Z( X-Y-Z in collection 1) and execpt product name A if cust...

0
Yesterday by Vu Khanh Hung
Engaging Magnific Popup on Page

Good afternoon We are using Brooklyn theme, and Magnific is built in for product images. We would like to create a gallery page with a list of images, and display them in a similar manner. What HTML and CSS would allow us to display a list of images using the Magnific Popup on a page? We've tried stealing data-mfp code from the product.liquid and theme.css files, but nothing has worked so...

1
Aug 1 2016 by SXEWORLDWIDE Store
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...

20
Jul 26 2016 by Andy Milk
Total Coupon vs. Scripted Discount Amount Logic

Hi there, A little background: I created a "buy multiple items, get % off" campaign using the script editor. We wanted to prevent people doubling up discounts by preventing customers from using coupon codes in conjunction with the offer, which I did by using cart.discount_code.reject. However, there are situations where using a coupon code on its own might actually give a larger discount tha...

1
Jul 25 2016 by Guillaume Malette
Customer Order Count

Hello, I'm curious, is there any way to access the "customer.orders_count" property inside the Scripts App? Or possibly a special customer group I have created? I would like to make some special customer discounts and not rely on the use of tags, if possible. Thank you for any help.

8
Jul 6 2016 by rickydazla
Using Scripts Editor to create a Buy 3 get 1 free, but only available to...

We are trying to figure out a way to offer our email list a Buy X Get Y Free, but not make it available across the entire site. Any app that we have tried, like Buy X Get One by Supple, it opens up the offer to anyone on that site that meets the criteria. We only want to offer these exclusives deals through email.

3
Jul 6 2016 by Alan Ly
New line item price message showing in Script Editor tester, but not in ...

I've used this convention:   line_item.change_line_price(line_item.line_price_was, message: "Discount does not apply to sale items")   The "Discount does not apply to sale items" message shows when I'm testing the script, but it doesn't show in the actual live cart, so it's confusing to customers why they're getting a discount. Is it maybe because we're using a custom theme that ...

1
Jun 30 2016 by Guillaume Malette
[Feature Request] Rename "scripts" to something less ambiguous - also su...

Information Architecture matters, "Scripts" is still incredibly ambiguous and creates enough confusion from the store owner that might think it means javascript, to new designers that may relate it to the script_tag, to devs confusing it's relation to the script tag api, or that it is full fledged ruby api scripting. On and on adding more clarification time sinks everytime someone uses this ...

2
Jun 28 2016 by Paul L. Newton
Add shipping cost to product

Hello People, I was wondering, maybe now with the Script Editor App it is possible to edit the price on certain collection or tagged products? I was wondering if anyone has tried this out? Or if anyone has a code that I could look to adapt to our store? I want to add instead of decrease to set a shipping cost of specific products. Is this possible? Or maybe could I alter the shipping cost on...

1
Jun 16 2016 by Jason
Accessing the customer using the script editor

Hi,   I'm receiving an error when trying to access the customer object using the Script Editor app. [Error] undefined method 'customer' for main for tag in customer.tags puts tag end   I have a customer added under the "Order Preview" in the editor. What am I doing wrong here?   Thank you for any assistance!

1
May 26 2016 by Andrew
request: add collection ids array to Product properties

Hello, Available Product properties include id: https://help.shopify.com/api/tutorials/shopify-scripts#product Please add an array of product collection ids too, similar to product.collections which is already available in liquid (we'd need only id though, not entire collection info) https://help.shopify.com/themes/liquid/objects/product#product-collections Thanks

1
May 9 2016 by Guillaume Malette
bug: Cart reload doesn't apply newly published script

Hi, After publishing a new script, reloading the cart in front-end store still uses the previous script. One has to change cart products qty in order for the new script to start being applied.  

1
May 9 2016 by Guillaume Malette
Disabling Coupon For Certain Discounts Items From Script Editor (Bundle)

REPEATED POST BELOW BEFORE READING.

1
Apr 26 2016 by Guillaume Malette
How do I add free shipping when certain SKUs are in the cart?

Hi all, Has anyone had success using Script Editor to change the shipping cost of an order based on the content of the cart? I want to be able to apply free shipping to an order that contains a certain SKU.  

1
Apr 26 2016 by Guillaume Malette
Error when using Product.type method?

Hi All.  The docs ( https://docs.shopify.com/api/tutorials/shopify-scripts ) say that the Product object has a "type" method to get the product type, but when I try to use it, the console outputs "[Error] undefined method 'type' for #\<Product:0x7f21457ff570\>". What gives? All of the other product methods work.  If I take my exact code, and just change ".type" to ".id", ".vendor", ".tags...

3
Apr 15 2016 by Adam H
Extending Shopify Scripts Beyond the Cart

Are there any plans to extend Shopify Scripts to other areas of the front-end and/or dashboard? I can see checkout scripts being a logical next step.

5
Mar 26 2016 by Blake Enloe
Every time I hit the refresh page I get the following error

Hello,  I'm building an app. Everything is working fine but when I hit the refresh button I get the following error :  [API] Invalid API key or access token (unrecognized login or wrong password) . I tried to keep the token and the rest of  my variables in a session but it's not working with or without the session.  Any suggestion will be great.  Thanks!  

1
Jun 16 2016 by Gustavo Waldman