Skip to content

Instantly share code, notes, and snippets.

View AbWahab07's full-sized avatar

Abdul Wahab AbWahab07

View GitHub Profile
These days some business have online store in different country with the same name. They have different URL for different country but they are facing a problem that how they can redirect store url based on IP address for eg.
www.domain.us – Customers in the United States
www.domain.ca – Customers in the Canada
www.domain.com – Customers in rest the world
This article guide you to do that.
# DEV Sandbox
## Objective
Learn Shopify and practice JavaScript by following BVA styleguide.
Some designs might be simplified along the way.
## Links
### Git
@AbWahab07
AbWahab07 / GitCommitEmoji.md
Created September 1, 2020 14:40 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@AbWahab07
AbWahab07 / readme.md
Created August 26, 2020 02:07 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@AbWahab07
AbWahab07 / product.liquid
Created May 8, 2020 01:53 — forked from NickFlicks/product.liquid
Select variants by clicking their images. Add the code at the bottom of sections/product.liquid
{% if product.variants.size > 1 %}
<script>
var variantImages = {},
thumbnails,
variant,
variantImage,
optionValue,
productOptions = [];
{% for variant in product.variants %}
variant = {{ variant | json }};
@AbWahab07
AbWahab07 / _shopify_add_free_product.md
Created April 3, 2020 01:59 — forked from stewartknapman/_shopify_add_free_product.md
Automagically add a free product to the customers cart when they purchase a certain product(s)

We want to automagically add a free product to the customers cart when they purchase a certain product(s).

Note: This code will likely need to be adapted to suit your theme, however it should be enough to discribe the concept.

Add the free product

  1. Define the free product and which products can add it. We create some theme setting that allow us to pick the free product and a collection of products that can add it. e.g. settings.free-product and settings.free-product-collection

Have you ever tried to track down which piece of javascript modified the DOM? Use a mutationObserver to monitor the DOM for changes. Then run console.trace() inside the callback. This will log a stack trace all the way back to the code that did the DOM modification. Basically copy and paste this code.

@AbWahab07
AbWahab07 / react-bootcamp-day-3-1.html
Last active December 18, 2019 02:23 — forked from tylermcginnis/react-bootcamp-day-3-1.html
Active, InActive friends list solution by Tyler
<!DOCTYPE html>
<html>
<head>
<title>First React App</title>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src='https://unpkg.com/babel-standalone@6/babel.min.js'></script>
</head>
<body>
<div id='app'></div>