Post by vijaya.settipalli » Mon Nov 30, 2015 5:32 pm

Hello everybody

I want to add a dropdown box at header that shows cities, and when a customer select a city the whole page get refreshed and just display that city products.

I mean when a city has been selected, all products that exist on that city get display.

How can i develop this?

Please help me.Its very urgent requirement for my project.

Thanks in advance


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by victorj » Tue Dec 01, 2015 3:22 am

create categorie group citys and add all needed citys under parent citys.

add all products to the desired categorie in the citys you want

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by vijaya.settipalli » Fri Dec 04, 2015 5:55 pm

Hi,
I created category group name cities.
How to display cities category group in header.


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by SuperBrain89 » Fri Dec 04, 2015 7:24 pm

please, tell us wich technology do you use? :)

Newbie

Posts

Joined
Fri Dec 04, 2015 7:22 pm

Post by victorj » Fri Dec 04, 2015 11:15 pm

vijaya.settipalli wrote:Hi,
I created category group name cities.
How to display cities category group in header.
categorie citys
tab data tick box top: show in topmenu bar.

with sort order you can set the order of your categories in topbar.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by IP_CAM » Fri Dec 04, 2015 11:19 pm

1. Create a Category, called City on my Test Site.
2. Create SubCategories for every City, called Test City ONE on my Test Site.
3. Add existing Products to ALL the Cities, where it is beeing offered.
(see Image, on how this is beeing done)

You can choose multiple settings, where a Product shall be visible.
It will display and be handled as/like a regular Category Selection, with every City as regular Subcategory.

Basically, it would be best, to replace all existing TOP Menu Links with States, Regions, or something, containing the matching Cities, to make it transparent and easy to locate, for Visitors, or then, make a (MODIFIED and seperately defined/declared, or simply hard-coded, by copy/paste/edit Page HTML-Source!) Copy of the TOP MENU, and place it above or below the existing one.

Check the Extension Section, something like this may exist already, in some form... ???

Ernie
Last edited by IP_CAM on Sun Jan 03, 2016 11:55 am, edited 1 time in total.

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by vijaya.settipalli » Sat Dec 05, 2015 2:37 pm

Hi,
I am using Opencart technology.

I would like to display in header bar,not in menu bar.
Just display only city category.


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by IP_CAM » Sun Dec 06, 2015 11:57 am

ok, I found something possibly matching for you, but it's a Module, but it cannot be put into your Header Section.
I have it work on my OC v.1.5.6.5_rc Version Default Theme, and no errors seen so far. Don't test it in other Themes, because if you use a responsive Theme, the Module has to be placed a Top, and possibly a little modified as well, to look nice on all Screen widths. I have not made any test on such, so far, but he CSS-Style Class can be defined !! ;)

Opencart menu management v1.5
http://www.opencart.com/index.php?route ... n_id=11220

I found it, and other related Mod's, here:
http://www.opencart.com/index.php?route ... 0in%20menu

Ernie
Last edited by IP_CAM on Sun Jan 01, 2017 5:25 am, edited 1 time in total.

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by vijaya.settipalli » Sun Dec 06, 2015 6:22 pm

Hi,
Thank you very very much for your reply.
I attached one image for actually requirement.
.

I would like to add cities form backend admin.That cities display as dropdown box at header position.

Please give me your valuable help.I am struggling with this problem since 10 days.

Help me my client is shouting at me.

Thanks in advance.


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by victorj » Sun Dec 06, 2015 6:39 pm

in standard oc this is not possible.
you will have to write a complete new module for this.

alterative, use categories for your citys and move the code for topmenu to topheader.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by vijaya.settipalli » Sun Dec 06, 2015 7:02 pm

Ok Thank you.

Can you tell me how to get only one category code.

I am customizing the header.tpl file, But i get all categories. but i don't know how to get only one category code.

Please send the code how to get one category (cities)


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by IP_CAM » Mon Dec 07, 2015 6:48 am

He probably meant a Top_Header-Section, to place such a setup, just above the regular header part.
In the responsive free AGNES-Theme for OC v.1.5.6.x, one can find such a top_header Implementation,
including the corresponding source, for those, aware of what to do with, in case, they need a working sample.

I looked around a little, to find possibly easy matching solutions, but you have to take, what exists, for free, or
then, get something made, according your needs.

So much to this, I should work on my own stuff again more ... ! :crazy:
Good Luck ! ;)
Ernie

Version 1.5.6.x Extensions, to add/modify/etc. Header Sections:
Header Special Extension free:
http://www.opencart.com/index.php?route ... n_id=14486

Custom opencart header menu free:
http://www.opencart.com/index.php?route ... n_id=14861

Header Special Extension paid:
http://www.opencart.com/index.php?route ... n_id=15740

Add external - internal links in header free:
http://www.opencart.com/index.php?route ... n_id=20404

Footer Special Extension free:
http://www.opencart.com/index.php?route ... n_id=14352

Menu Designer paid:
http://www.opencart.com/index.php?route ... on_id=9440

Top Menu paid:
http://www.opencart.com/index.php?route ... n_id=14173

Position below header & above footer paid:
http://www.opencart.com/index.php?route ... n_id=14593

OC v.2.x Versions, just to mention it:

[OCMOD] Extra Positions by viethemes OC v2.x free:
http://www.opencart.com/index.php?route ... n_id=20569

Xbar - top-bottom nav bar OC v2.x free:
http://www.opencart.com/index.php?route ... n_id=23082

Flexible Menu OC v2.x free:
http://www.opencart.com/index.php?route ... n_id=22754
Last edited by IP_CAM on Tue Feb 16, 2016 11:14 am, edited 1 time in total.

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by vijaya.settipalli » Mon Dec 07, 2015 7:00 pm

Hi,

I am getting the only one category and its subcategory from database.

<?php
$query=mysql_query("SELECT oc_category.*, oc_category_description.* FROM oc_category JOIN oc_category_description ON oc_category.category_id=oc_category_description.category_id where oc_category.parent_id=64");
$res=mysql_fetch_array($query);
$parent_id=$res['parent_id'];
echo $parent_id;
?>
<select name="cities">
<option value="">Select City</option>
<?php
while($city=mysql_fetch_array($query))
{
?>
<option value="<?php echo $city['name']; ?>"><a href="#"><?php echo $city['name']; ?></a></option>
<?php
} ?>
</select>

But anchor tag doesn't work.

Please give me your valuable suggestion .I click on particular city it shows that city products only

Please find the attachment. Thanks in advance.


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by vijaya.settipalli » Tue Dec 08, 2015 4:01 pm

Hi Everyone,

Thanks for your help to solve my requirement.

Finally i finished my task.


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by vijaya.settipalli » Tue Dec 08, 2015 4:04 pm

Hi,

How to change theme name in catalog\view\theme\theme_name.


Posts

Joined
Mon Nov 30, 2015 5:23 pm

Post by IP_CAM » Wed Dec 09, 2015 7:25 am

>> How to change theme name in catalog\view\theme\theme_name. <<

Technically it is possible, but it also depends on, if a Custom Theme also contains other Files,
placed somewhere in the Catalog/whatever/... and/or in the Admin Section.
Then, one would have to check and eventually slightly rewrite everyone of such files/lines, involved.
Otherwise, usually, only the header.tpl and possibly footer.tpl includes hard-coded direct CUSTOM-THEME-
linked Content.

Wild Samples of such happenings, in 3 different places:

Controller:

Code: Select all

class ControllerModule---Kvvaradha--- extends Controller {
class ControllerModule---Christmasboom--- extends Controller {
Model:

Code: Select all

class Model---OmfOmf--- extends Model {
Theme (i.E.: header/footer/file-link):

Code: Select all

<?php include ('catalog/view/theme/---agnes---/php/payment.php'); ?>
catalog/view/theme/---agnes---/image/layout/footer/icons/location_<?php echo $this->....

<link rel="stylesheet" href="catalog/view/theme/---ancart---/stylesheet/responsiveslides.css" />
<script src="catalog/view/theme/---ancart---/stylesheet/responsiveslides.js"></script>
---
Just to give you an idea. ;)
Ernie
openshop.li/shop/

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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by majiji » Tue May 05, 2020 6:44 am

Hello house,

Pls tell me how i can Add a dropdown box at left side header that shows cities and when i click on any city it displays the particular product assign to that city

Newbie

Posts

Joined
Mon Aug 14, 2017 3:35 am
Who is online

Users browsing this forum: No registered users and 30 guests