I'm looking for an extension or php to do the following:
A small simple form that can be placed on my main default opencart store that says "enter your store id here" and a text box for them to enter a code. By them entering a specific "store code" they will then be redirected to their Multi-store, or even an specific external url based on what was entered.
In other words, a centrally located place (located on my default store) to launch any multi-store based on a code entered in a text box.
Thank you, Jim
A small simple form that can be placed on my main default opencart store that says "enter your store id here" and a text box for them to enter a code. By them entering a specific "store code" they will then be redirected to their Multi-store, or even an specific external url based on what was entered.
In other words, a centrally located place (located on my default store) to launch any multi-store based on a code entered in a text box.
Thank you, Jim
such does not exist (yet) for opencart, as per my (limited )knowledge.
Ernie
openshop.li
Ernie
openshop.li
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
There's a built in module that lists all multi-stores in a dropdown.
admin>extensions>modules>store
Not based on an input code but might be good for what you're after.
admin>extensions>modules>store
Not based on an input code but might be good for what you're after.
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
You could implement that solely with html/javascript...fvteamsports wrote:I'm looking for an extension or php to do the following:
A small simple form that can be placed on my main default opencart store that says "enter your store id here" and a text box for them to enter a code. By them entering a specific "store code" they will then be redirected to their Multi-store, or even an specific external url based on what was entered.
In other words, a centrally located place (located on my default store) to launch any multi-store based on a code entered in a text box.
Thank you, Jim
Like this: http://codepen.io/anon/pen/wGoQMz
(note that it won't actually send to the url, but only because codepen.io runs the javascript in a frame. This would work on a normal site.)
I tried adding that script in the header and also tried to call for it and I can not get it to work. It looks like it should work.
Thanks for the help!
Thanks for the help!
Does anyone know what is wrong with the code below? Should be able to type in YAHOO and go to yahoo.com. The submit box doesn't even show up on my opencart page?
<html>
<head>
<script>
document.getElementById("gobutton").addEventListener("click", function(event){
event.preventDefault()
var idmap={
REDDIT:"http://reddit.com",
YAHOO:"http://yahoo.com",
BING:"http://bing.com"
};
id=document.getElementById("siteid").value;
if (id in idmap) {
alert("going to "+idmap[id]);
window.location.href=idmap[id];
} else {
alert("invalid code ["+id+"]")
}
event.preventDefault()
});
</Script>
</Head>
<Body>
<form id="urllauncher" action='#'>
<label for="siteid">Site id</label>
<input type="text" id="siteid">
<button type="submit" id="gobutton">Go</button>
</form>
</Body>
</Html>
<html>
<head>
<script>
document.getElementById("gobutton").addEventListener("click", function(event){
event.preventDefault()
var idmap={
REDDIT:"http://reddit.com",
YAHOO:"http://yahoo.com",
BING:"http://bing.com"
};
id=document.getElementById("siteid").value;
if (id in idmap) {
alert("going to "+idmap[id]);
window.location.href=idmap[id];
} else {
alert("invalid code ["+id+"]")
}
event.preventDefault()
});
</Script>
</Head>
<Body>
<form id="urllauncher" action='#'>
<label for="siteid">Site id</label>
<input type="text" id="siteid">
<button type="submit" id="gobutton">Go</button>
</form>
</Body>
</Html>
Who is online
Users browsing this forum: No registered users and 2 guests