Skip to content

Instantly share code, notes, and snippets.

View btekbtek's full-sized avatar
💭
Freelancer

BartZ btekbtek

💭
Freelancer
View GitHub Profile
@btekbtek
btekbtek / README.md
Created March 8, 2019 10:12 — forked from timneutkens/README.md
Magento2 | Execute data-mage-init and x-magento-init in dynamic content (ajax request)

Execute data-mage-init and x-magento-init in dynamic content (ajax response)

Trigger .trigger('contentUpdated') on the element where dynamic content is injected.

$.ajax({
    url: 'https://www.example.com',
    method: 'POST',
    data: {
 id: '1'
@btekbtek
btekbtek / shopify-order-form.md
Created May 3, 2023 19:06 — forked from CarsonBain/shopify-order-form.md
Building a Quick Order Form with the Shopify AJAX API

Building a Quick Order Form with the Shopify AJAX API

This post will take you through the steps to add a quick order form page on your Shopify store. The form we will be adding allows users to quickly select quantities of items they would like to purchase, and then add all selected items to cart with one click.

Using the AJAX API for this type of task will give us a large amount of flexibility in how we can add items to the cart.


Creating a new page template