Creating an App on Shopify

After working on Shopify development for a little bit, I have encountered a specific requirement from my client that is not currently available in the app store.

The task involves:

  1. Creating two discount tiers based on the total value of the cart (e.g. 10% off for carts totaling more than $40 and 5% off for carts totaling more than $80)
  2. Operating only under the following circumstances:
    • When the customer is NOT logged in
    • When the customer is logged in, but their tags DO NOT include 'wholesale'
  3. Preferably avoiding the use of coupons to adjust prices
  4. Ensuring compatibility with a sliding AJAX cart modal

I am considering creating my first app to address this need, but I am unsure about the process and the level of difficulty as a beginner in app development. While I am familiar with Shopify in general, Liquid, CSS, JavaScript, and jQuery, I lack experience with APIs (or may have unknowingly used one before).

Before I embark on this project, what resources should I review? For those who have been through a similar experience, how would you approach it if starting over?

Thank you in advance!

Answer №1

It turns out that you can easily apply a discount without the need to develop an app (even though I initially preferred not using discount codes). By following this helpful guide, it is possible to automatically apply a discount by dynamically adjusting the form action and including a query string.

While this method may not be the most elegant, it certainly gets the job done efficiently!

Answer №2

Here's a piece of advice for you: don't bother with all the chaos you're currently dealing with. Instead, why not consider a more elegant solution? By simply switching to Shopify Plus, your client's needs can be addressed quickly with just a few lines of code in Script Editor. It's as simple as that! No more hours of troubleshooting and dealing with fragile, constantly breaking code.

If you choose to continue down your current path, best of luck to you. But trust me, it will only lead to frustration and headaches in the long run. So why not save yourself the trouble and opt for a smoother, more efficient option?

In my opinion, tackling this problem is simply not worth the effort. Sometimes, it's better to work smarter, not harder.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to transfer Javascript variables from an HTML template to a view function in Django?

Currently, I am developing a website using Django. One of the features I'm working on is a form in my HTML page that includes a textbox for users to input their name with a label "Enter your name". Underneath the textbox, there is a submit button. ...

Is there a more efficient method for creating HTML with coffeescript / jQuery besides using strings?

Today marks my first attempt at creating a "answer your own question" post, so I hope I am on the right track. The burning question in my mind was, "Is there a more efficient way to generate HTML with jQuery rather than using tag strings?" My goal is to c ...

error detection in AJAX response handler

My web-application was created using PHP, AJAX, and jQuery, and the development process went smoothly. The majority of the requests to the application are made via AJAX for operations such as insert, update, delete, and select. I have already implemented ...

Trouble accessing Google API within React component

I have been working on developing a React App that utilizes Node and Express on the Server side. However, I encountered an issue with Cross-Origin Request Blocked error when making an ajax call to Google API. The ajax request code snippet is as follows: ...

Is there a way to insert a row into a datatable without needing to perform an Ajax reload or using the

When using row.add(…) on a datatable, I encounter an issue where it refreshes via an ajax call when draw() is activated. This leads to the new row not being visible because the data is reloaded from the database. The UX flow behind this scenario is as f ...

Is it possible to include pseudo element elements in the configuration of a custom theme in Material UI?

Within my file themeConfig.js, I have defined several theme variables that are utilized to style different components throughout my application. Among these variables, there is a need for implementing the -webkit scrollbar styles for certain components. Du ...

Quoting Properties in Javascript Objects

If we have the object below: var ObjectName = { propertyOne: 1, propertyTwo: 2 } Do we need to include quotes around the object properties like this? var ObjectName = { 'propertyOne': 1, 'propertyTwo': 2 } Is the sol ...

What are the issues with this straightforward joining of strings?

Trying to merge multiple lines of text in a file using Node.js but experiencing unexpected results. It seems like the previous line is being overwritten, and I'm not sure why. Merging 'Line' with its subsequent 'Sub' items on th ...

Utilizing Object-Oriented Programming in jQuery/JavaScript to effectively pass a value out of a function that is compatible across different browsers

While this question may have been asked before, I urgently need a solution for a production environment. I am feeling quite overwhelmed trying to figure out which objects I should create and utilize. function scroll(min, max) { // perform actions } fun ...

Cross-Origin Resource Sharing (CORS): The preflight request response does not satisfy the access control check

I've been facing an issue with a simple POST method to my API through the browser. The request fails, but when I try the same on Postman, it works fine. The response includes a JSON string and two cookies. In an attempt to resolve this, I set the hea ...

Navigating through the various iterations of jQuery

Unique Case Study I'm currently facing a dilemma involving the integration of jstree and jquery-ui datepicker. The scenario is this: I am attempting to utilize jquery-ui-datepicker on an input element that is dynamically inserted into the DOM after ...

Creating a jquery DataTable from HTML generated by angular $sce can be done by following these steps

I have created an Angular controller that takes data and generates an HTML table from it. The generated table is being displayed on the page. Now, I want to apply jQuery data tables using that scope variable. The variable contains the HTML code of the tabl ...

Unable to utilize jQuery's .append(data) function due to the need to use .val(append(data)) instead

I have been attempting to utilize JQuery .append(data) on success in order to change the value of an input to the appended data like this: .val(append(data)), but it doesn't seem to be working. Surprisingly, I can successfully change the value to a st ...

Tips for preventing page breaks (when printing or saving as a PDF) in lengthy HTML tables

Here is the link to a single HTML file (including style and scripts): FQ.html The problem I'm facing can be seen in this image: https://i.sstatic.net/Nr4BZ.png I've tried several solutions, the latest of which involves the following CSS... @me ...

What is the best way to fetch d3 data from a service?

I've been exploring a tutorial on creating charts with d3, which can be found at: When it comes to loading data for use in d3, I typically rely on the following code snippet: d3.tsv("data.tsv", type, function(error, data) { The file "data.tsv" is c ...

Using PHP variables in JavaScript fetched through AJAX loading

I am currently attempting to retrieve a PHP variable from another page using AJAX in JavaScript, but it is not displaying any alerts. This is the PHP code for 'getposY': <?php include"connectdatabase.php"; $posYquery=mysql_query("Select posY ...

JavaScript's efficient way to target multiple class names

My goal is to extract and process JSON data into specific instances of a class named "slide_content" I want to achieve something like this: slide_content[0] Unfortunately, JS does not offer a method like getElementByClass(). The relevant API data can b ...

What steps can be taken to prolong the duration of a service?

As a newcomer to angularjs, I am struggling to find documentation or examples on how to extend a basic service in order to utilize its methods from other services. For example, consider the following basic service: angular.module('myServices', [ ...

Tips for configuring Visual Studio Code to utilize path mappings for handling automatic imports

In order to streamline my project and avoid messy paths, I am implementing absolute paths that will allow for consistent imports regardless of the file's location in the project tree. For this purpose, I made adjustments to the tsconfig.json: "paths ...

I'm having trouble getting jQuery to work properly with Bootstrap buttons

In simple terms, my objective is to have two buttons on a page where "1" is displayed when the first button is pressed and "2" is displayed when the second button is pressed. This functionality works fine with radio inputs, but when I incorporate button la ...