Click here to Skip to main content
15,885,216 members

Comments by Jeremy Falcon (Top 11 by date)

Jeremy Falcon yesterday View    
In theory yes. Shopify has frameworks such as Hydrogen that decouples the backend APIs from the templating system. But, you're trying to run before you can walk by doing this you hire a dev or spend the years becoming one yourself. As far as managing products, Shopify in particular (it's the only one I've used in recent years) makes it pretty easy. Last I checked, they didn't have bulk imports/exports though... unless you bought an addon. Maybe that's changed now, dunno. Anyway, if you're serious about starting a business, it's time you started signing up for free/cheap accounts. Nobody on any website will have all the experience you need, so you may as well get used to doing recon now.
Jeremy Falcon 27-Feb-17 12:29pm View    
You knocked it up? As if to say you got your code pregnant?
Jeremy Falcon 16-Aug-16 16:29pm View    
Then you'll find that there's no way of fixing this error without redesigning your application. Global_Variables.h is acting more like a main include file here, which is ok. Just look at it from a broad to narrow perspective and redesign your app... Main Parts of App > Global > Debugger, Window, Input.
Jeremy Falcon 27-Jul-16 15:43pm View    
Yes you could do that, with one notable difference, .innerHTML and .length are properties. As such you'd have to either write a wrapper method for it too, or a new prototype that calls the real one underneath the hood, but on the same object. Since code is worth a thousand words...

<script>
function id(element) {
return document.getElementById(element);
}

Object.prototype.in = function(markup) {
this.innerHTML = markup;
}
</script>

<p id="demo"></p>

<script>
// now the dom element exists
id('demo').in('i will show');
</script>
Jeremy Falcon 27-Jul-16 13:08pm View    
In this example, you're close but the "markup" parameter should be what you want to show rather than the ID. Also, for the id() function you'll need to return the value. And last but not least you need to make sure the DOM element (the paragraph in this example) exists before you can call it. Try something like this...

<script>
function id(element) {
return document.getElementById(element);
}

// this cannot be called yet because the p element does not exist
id("demo").innerHTML = "i will not show";
</script>

<p id="demo"></p>

<script>
// now the dom element exists
id("demo").innerHTML = "i will show";
</script>