Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Top cities and top countries in infobox


gregy

Recommended Posts

cool answer .. any idea how?  :P

:D I couldn't resist :D

 

I think the idea would be to create a simple new infobox (like explained in the knowledgebase of how to do) and fill it with the information you would like to show. In your case the top 5 cities and countries of your customers which would mean to query the customers table once to get all customer records and after that a nifty loop and array with routine to find the top 5 and feed that to the infobox.

It shouldn't be too much work and there is enough sample code available throughout all the standard osC files to see how you should build the query and later on loop through it. If you get stuck just PM me and I'll see if I can find time to get you something working or at least a base.

Link to comment
Share on other sites

:D  I couldn't resist  :D

 

I think the idea would be to create a simple new infobox (like explained in the knowledgebase of how to do) and fill it with the information you would like to show. In your case the top 5 cities and countries of your customers which would mean to query the customers table once to get all customer records and after that a nifty loop and array with routine to find the top 5 and feed that to the infobox.

It shouldn't be too much work and there is enough sample code available throughout all the standard osC files to see how you should build the query and later on loop through it. If you get stuck just PM me and I'll see if I can find time to get you something working or at least a base.

 

i'm not programer .. nor my knowledge of php is good. By the time i run OSC i'm into it pretty far .. but not enough to write code for this query .. i can make new infobox .. no problem .. i've done it few .. but not sure about the code ;) :(

Link to comment
Share on other sites

  • 5 months later...
hi

 

i keep getting error temporairly database error ..

 

contribution was updated here

 

http://www.oscommerce.com/community/contri...3/search,cities

 

any help please?

 

That's another contributiion as was meant here. You best look for the thread of the particular contribution you refer to to seek an answer.

Link to comment
Share on other sites

  • 4 months later...
That's another contributiion as was meant here. You best look for the thread of the particular contribution you refer to to seek an answer.

 

Hello! I just finished installing this contribution and it works great!!! I would like to know what is required to have the cities shown with their states...right now our store shows the cities, but some cities could be in multiple states...I would like to see it display the following:

 

Jupiter, Florida

Annapolis, Maryland

...etc.

 

Any help would be greatly apreciated. I was going to contact the original author, but he requested that all support requests be placed here in the forum.

 

Cheers,

Travis

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...