Storelocator magento hide stores at start [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have this Store Locator
Installed on my website. It's all working fine and well, but it's a bit slow. This is because there are 500 stores located on the map.
Edit:
I am looking for this!:
https://googlemaps.github.io/js-marker-clusterer/examples/simple_example.html?compiled
Can somebody explain me how to implement this (javascript), into a magento site?

I suggest to build your own module for this.
try this module creator: http://www.silksoftware.com/magento-module-creator/
on the (Need Add Single Table Model) put yes, and then select (Need Backend Model Manager) and fill the fields.
Basically in your case you need the following fields (store name, store lat, store long, store full address, etc..)
the module will provide you with manager in the backend to manage and create stores easily.
then you have to style the list on the front end..
print them in the same format used in the example (you should use this format: https://googlemaps.github.io/js-marker-clusterer/examples/data.json)
and finally load the js and it should work perfectly.
Let me know if it worked or you are still facing any issue?

Related

How do I create a search bar for my firebase object [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have a firebase database and I want to create a search bar that will filter results from the database objects.
But I do not know how to go about it.
I have looked everywhere to find a good example but none of those I find are related to firebase.
otherwise is there an alternative way I can do this?
structure of the real-time database on firebase
any help and suggestions would be great.
Firebase is not really good for searching. The firebase team recommends using a third party solution like algolia.
However if you don't want to go through that you can just retrieve all the data in the collection or path you want to search, and add searching logic in your client

Simple local search function. Javascript and JSON? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Building a 'fake' web browser and web pages that are all compiled locally in a windows form application. The whole thing operates offline.
I need to build a search function on one of the web pages I've made. Obviously theirs no server involved, so I have to have the data extracted and displayed from a local source. I've used 'Jput' before in a previous project so i was thinking about having a Json file that can be called. The site is a fake social network, so when a user searches a name or phrase, it displays related results (profiles) either on a separate page or within the current doc. Jput is good, but its pretty limited when it comes to styling.
QUESTION
What would be the best way of doing this? How would I index all these results and how would the search engine work?
Let me know if more detail is needed for this question
Thanks!
You can use a normal Javascript array ( that can be stored as json) :
Example data:
var users=[
{name:"John",age:22}
{name:"Jack",age:23}
]
Now you can search after name:
document.body.innerHTML=users.filter(el=>el.name.split("Ja")[1]).map(el=>el.name).join("<br>");
This will show all users that names contain "Ja"inside of the document ( or any other html elem, can be based on users input).
You can easily show a users profile like this:
user=users.find(el=>el.name=="Jack");
for(key in user){
alert(key+":"+user[key]);
}
This is just the beginning of what you can do with natives js, no need for libs etc.

How to created input data with Drupal? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
So, I've been doing programming and HTML for some time now. A lot of it is front end working with CMSs and stylizing. However there's one thing I've been wanting to learn.
When it comes to drupal, how do I go about creating something where a user can enter in text and it appears above? Honestly, I'm not sure if I'm even asking about it correctly. It's something a lot of websites already have so I'm sure it's not too difficult to answer.
The best example might be Basecamp. Essentially what I'm looking to do is that if a user is on a project they are apart of, I want them to write in a little text box (similar to what i'm doing right now) click submit and it appears in a comment section above. Some sort of simple form that links directly to a field I created in drupal.
Yes I do understand there's a comment module that's built into core but I'm looking to create something similar. Or even as similar as a twitter feed. A user just goes to his or her page and has a box for them to write out a small message.
Can someone point me in the right direction as it pertains to Drupal.
Best,
V
For data input, websites usually use forms. Drupal provies an Form API that you use to create forms and process their submission. You then need to process the submitted data and store them in the database. For that you will need Drupal's database abstraction layer. Finally, you will need to build page to display the form and the stored data. A page is the result of a controller method binded to a route. That result can either be a render array (see the Theme and rende for more information), or a Symfony Response object.

Dynamic tables & boxes [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm creating a view wherein I need to add multiple boxes, wherein there is a number within the box, which is dynamically changing as per data (csv file)
Also, I'm adding tables, with dynamic numbers within the same which should again, change with the data (csv)
I'm trying to design an approach to get it done and looking for js libraries to use here.
Is there anything in particular that I should look for? Can tables be added without table command in html (alternatives)?
Any feedback would be highly appreciated.
This blog post is a simple representation of d3.js usage to load a csv to a html table.
Also there is already a StackOverflow post about loading csv data via php, if you are going for a backend approach.

Types of output that will work for a callback [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am currently working on a small nodejs project that is responsible for returning search terms from a twitter feed. I have the search working however because I am new to this I am having problems displaying this on my webpage. The search information I want to display is being held by a callback from my function and I want to output this information. Keep in mind this information is ascertained after the webpage is loaded and I think that is why response.write(information); is not working for me. However if I do console.log(information); I do get the information I want but it's just not where I want it. Can someone help me out with outputting please.
I ended up solving this by using JSON.stringify(information);
You are right, it's very likely that once you have returned your webpage the response will be closed.
2 options:
1) you load your webpage first on 1 static route (using static middleware) and this web page then does an ajax call to a second route which returns your information.
2) you don't return your webpage until you have retrieved your information. I'm assuming your information will need to be displayed on this webpage which means you'll have to turn your webpage in a template and merge it with your information. You can use a Jade template or underscore template for example.

Categories

Resources