Home > Discussion Forums >Script Editor App
Unanswered Topics
Create new topic
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...
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?
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...
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...
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...
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...
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...
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.
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.
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 ...
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 ...
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...
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!
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
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.
REPEATED POST BELOW BEFORE READING.
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.
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...
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.
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!
Build an online store with Shopify