Accepting credit cards, warehouses, and shipping and fulfilling orders
Hello everyone, I am trying to add a note to the orders of my store, the content of the note is a json but I see that not all the orders are added the note, what could be happening? Thank you in advance for your help.
The code I use is the following:
<script>
(function ($) {
$(document).on("page:load page:change", function () {
if (Shopify.Checkout.step === 'payment_method') {
var Origen = 'WEB';
{% if customer.tags contains 'EMBAJADOR' %} Origen = 'EMBAJADOR';{% endif %}
setObjectNote(Origen);
}
});
function setObjectNote(origen){
var ObjNote = {}
var myInput = document.getElementById("checkout_billing_note");
if (myInput == null){
var nota= '<div data-address-field="note" data-autocomplete-field-container="true" style="display: none;" class="field field--optional"><div class="field__input-wrapper"><label class="field__label field__label--visible" for="checkout_billing_note">Origen (opcional)</label><input placeholder="Origen (opcional)" autocomplete="billing note" autocorrect="off" data-backup="note" class="field__input" size="30" type="text" name="checkout[note]" id="checkout_billing_note"></div></div>'
$("form[data-payment-form='']").append(nota)
myInput = document.getElementById("checkout_billing_note");
}else
{
myInput.value = "";
}
ObjNote.Origen = origen;
myInput.value = JSON.stringify(ObjNote);
}
}) (Checkout.$);
</script>
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024