Skip to content

Instantly share code, notes, and snippets.

View alquezajanmaverick's full-sized avatar
👨‍💻

Jan Maverick Alqueza alquezajanmaverick

👨‍💻
View GitHub Profile
@alquezajanmaverick
alquezajanmaverick / product.html
Last active July 25, 2023 00:34
Shopify Direct Checkout [Subscription Product]
<form method="post" action='/cart'>
<input name='id' class='hidden' value="VARIANT_ID" type='hidden'>
<input name='selling_plan' class='hidden' value="SELLING_PLAN_ID" type='hidden'>
<input name='discount' class='hidden' value="DISCOUNT_CODE" type='hidden'>
<input name='qty' class='hidden' value="1" type='hidden'>
<button type="submit" name="checkout">Buy Now</button>
</form>
@alquezajanmaverick
alquezajanmaverick / sample.liquid
Created December 26, 2022 11:54
Shopify meta image override per page
{% if handle == 'your-page-handle' %}
{%- capture og_image_tags -%}<meta property="og:image" content="link-to-your-image">{%- endcapture -%}
{%- capture og_image_secure_url_tags -%}<meta property="og:image:secure_url" content="link-to-your-image">{%- endcapture -%}
{% endif %}
@alquezajanmaverick
alquezajanmaverick / domain-redirection.liquid
Last active September 11, 2023 21:24
Shopify Domain Redirection
<script>
/**
* Geolocation app must be installed
* redirection variable -> list of supported countries with specifi domain extension ( assigned via Shopify Markets setting )
*/
(()=>{
let published_locales = {{ shop.published_locales | json }}
let shop_locales = published_locales.map(locale=>locale.shop_locale.locale.toLowerCase())
let redirection = ["cz","dk","fi","fr","gr","it","nl","pl","pt","es","se"]
@alquezajanmaverick
alquezajanmaverick / main.js
Last active October 14, 2022 11:52
Vue Global Component Import
import { createApp } from 'vue'
import GlobalComponents from './renderComponent'
import App from './../App.vue'
import './style.css'
const app = createApp(App)
app.use(GlobalComponents)
app.mount('#app')
@alquezajanmaverick
alquezajanmaverick / Child.vue
Last active October 13, 2022 00:49
Vue 3 SFC v-model
<script setup>
const props = defineProps({
modelValue: String
})
const emit = defineEmits(['update:modelValue'])
function updateValue(value) {
emit('update:modelValue', value)