heovang Posted April 17, 2013 Share Posted April 17, 2013 Hi all I wonder if anyone would help or direct me to some module which has an option to do this: http://www.ties.com/ The website is an example, if you click on SHop By Colour, you will see that next to Blue colour, will have a small blue colour box ? Thank you so much Link to comment Share on other sites More sharing options...
PascalVG Posted April 18, 2013 Share Posted April 18, 2013 Hi Heovang, I played with it a little bit and maybe this comes close: Edit file /modules/blocktopmenu/blocktopmenu.php: Go to function: private function getCategory($id_category, $id_lang = false, $id_shop = false) and change these lines: ... if (!empty($is_intersected)) { $this->_menu .= '<li '.$selected.'>'; $this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>'; // delete this line if (count($children)) ... into this: ... if (!empty($is_intersected)) { $this->_menu .= '<li '.$selected.'>'; if ($category->id_image != null) // change into this red part $this->_menu .= '<a href="'.$category_link.'">'.' <img src="'._THEME_CAT_DIR_. $category->id_image.'.jpg" width="20" height=20"> '.$category->name.'</a>'; else $this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>'; if (count($children)) ... Code is quite 'raw', and may need adjustment, but what it basically does is it displays the category picture in front of the category name. If you then make a category 'Show by colour' and add subcategories like 'Green', 'Red', 'Blue' and add as their category image an image in the right colour, then it looks somewhat to what you want. Give a look here (temporarily link, may be deleted soon) http://prestatestshop.buymethai.com/index.php at the topmenu I added the menu Shop by colour. In it's submenu I added the subcategories red and green as an example. Clicking on it will for example go to the subcategory 'green' page, where you can show all green products you have... Does this look anything interesting?? Let me know, Pascal Link to comment Share on other sites More sharing options...
heovang Posted April 18, 2013 Author Share Posted April 18, 2013 (edited) Hi Pascal You are amazing, I will implement it on my test site now and see how it goes..Will get back to you in an hour or two, Edited April 18, 2013 by heovang (see edit history) Link to comment Share on other sites More sharing options...
smallbizwiz Posted August 18, 2013 Share Posted August 18, 2013 Nice work on this one...saved me a ton of time! Link to comment Share on other sites More sharing options...
vekia Posted August 18, 2013 Share Posted August 18, 2013 @smallbizwiz so everything works as you expected? @heovang the same for you? Link to comment Share on other sites More sharing options...
smallbizwiz Posted August 18, 2013 Share Posted August 18, 2013 Yep...one thing to add though, TopMenu is one of those modules that cache, so make sure to recompile (Advanced Parameters - Performance), else you won't see any changes (e.g. re-sizing the image) Link to comment Share on other sites More sharing options...
mouse1 Posted September 3, 2013 Share Posted September 3, 2013 Hi guys, thank you for this great code, it works perfectly for me. Would you possibly know how to adjust the code so that it adds a static number at the end of the image name? For example, the code generates pictures called 123.jpg, 124.jpg, 125.jpg and I would like them to be called 123-2.jpg, 124-2.jpg, 125-2.jpg. It's because I need a bit different category and subcategory pictures in top menu from the ones I have everywhere else in the shop (I would, of course, adjust the new pics manually and upload them in the relevant folder). I know it might sound a bit crazy, but I can't find any better solution. Thank you. Link to comment Share on other sites More sharing options...
geolan Posted September 3, 2013 Share Posted September 3, 2013 Hi! Anybody to help me how o change the black/grey block bg color to brown. sorry I'm new to this cms thanks Link to comment Share on other sites More sharing options...
vekia Posted September 3, 2013 Share Posted September 3, 2013 Hi! Anybody to help me how o change the black/grey block bg color to brown. sorry I'm new to this cms thanks where exactly? can you shed some light on this? Link to comment Share on other sites More sharing options...
geolan Posted September 3, 2013 Share Posted September 3, 2013 check www.tangoafricasafaris.com, i want all grey or black areas like block with top menues to be having brown bg instead of balack or grey. thank Link to comment Share on other sites More sharing options...
PascalVG Posted September 3, 2013 Share Posted September 3, 2013 mouse, probably like this: if (!empty($is_intersected)){$this->_menu .= '<li '.$selected.'>';if ($category->id_image != null) // change into this red part$this->_menu .= '<a href="'.$category_link.'">'.' <img src="'._THEME_CAT_DIR_.$category->id_image.'-2.jpg" width="20" height=20"> '.$category->name.'</a>';else$this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>';if (count($children))... (Add blue -2 to code above) :-) Explain a little more what you need, maybe there's another way to solve your problem? pascal 1 Link to comment Share on other sites More sharing options...
geolan Posted September 3, 2013 Share Posted September 3, 2013 (edited) Thanks again bro! when you look at my web site .\, there are topic like :- Home | About us |Reservation |Nairobi Excursions |Hotels |Terms and conditions NAIROBI EXCURSIONS Itineraries TANZANIA SAFARIS FLASH EVENTS the backgrond where these link are are in grey color, that what i want to change to brown. thanks Edited September 3, 2013 by geolan (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted September 3, 2013 Share Posted September 3, 2013 Hi Geolan, For the top menu: In the file, /modules/blocktopmenu/css/superfish-modified.css change this: (line 15 ) .sf-menu { margin: 10px 0; padding: 0; width: 980px; background: #383838; <--- change to desired code, like #884020 } grey part, you can change in the same file (line 92) .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active { background: #4E4E4E; <-- change into desired code, like #AA6030} for the titles of other blocks : edit file: /themes/default/css/global.css: (line 292) .block .title_block, .block h4 { padding: 6px 11px; font-size: 12px; color: #fff; text-shadow: 0 1px 0 #000; text-transform: uppercase; background: #383838; <-- change to desired code, like #884020 text-align: left; font-weight: bold; } for big block down below (the footer), same file: /themes/default/css/global.css: (line 577) #footer { color: #fff; background: #333; <-- change to desired code, like #884020 } for search box - button: edit file: /modules/blocksearch/blocksearch.css (line19) #search_block_top .button { border: none; border-radius: 0; color: #fff; text-transform: uppercase; background: url(img/bg_search_submit.png) repeat-x 0 0 #101010; <<--- delete front part, and change color, like #884020 float: left; height: 25px; } contact us back block (right below) edit file: /modules/blockcontact/blockcontact.css (line 24) #contact_block a { display: block; margin-left: 60px; padding: 6px 8px; font: bold 10px Arial,Verdana,sans-serif; color: #fff; text-shadow: 0 -1px 0 #000; text-transform: uppercase; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: url(images/bloc_contact_a_bg.png) repeat-x 0 0 #000; <--- delete front part, and change #000 to desired color, like #884020 } Hope this helps, pascal 1 Link to comment Share on other sites More sharing options...
geolan Posted September 3, 2013 Share Posted September 3, 2013 ok thanks will try in in the morning then will update. Thanks and be bless bro Link to comment Share on other sites More sharing options...
mouse1 Posted September 3, 2013 Share Posted September 3, 2013 Thank you so much PascalVG !! I'm gonna try and explain... I'm also including pics to illustrate. 1) My problem is that I have black and white design. My category and subcategory images are black on white background which is OK. However, my top menu is black, so the font is white and the pictures should also be white... but they are black. :-) Actually they are black with white square background. When I use invert in css, the pics look the way I want, but this doesn't work for me in all browsers. And then another problem comes... problem No. 2 2) When I invert cat and subcat images in css, ALL cat and subcat pictures are inverted, of course, including the ones in my Color category which gives me totally mixed up colors. I can't think of any other solution than adjusting my pics manually (invert the black and white ones and keep the color ones the way they are). Pls see the pics to get a better idea of what I mean. Thank you for your help. Link to comment Share on other sites More sharing options...
PascalVG Posted September 3, 2013 Share Posted September 3, 2013 Mouse do you have a link to your site, so I can play with it a little? (You can PM it to me if you don't want to make it public...) Thx. Link to comment Share on other sites More sharing options...
PascalVG Posted September 3, 2013 Share Posted September 3, 2013 P.S. First quick thought is to make the top menu also white... (maybe with some black border lines to show item blocks, outside border etc.). Is that possible/good idea?? Well, if possible, give me a link. Seeing the real site gives me some full picture... pascal Link to comment Share on other sites More sharing options...
mouse1 Posted September 3, 2013 Share Posted September 3, 2013 P.S. First quick thought is to make the top menu also white... (maybe with some black border lines to show item blocks, outside border etc.). Is that possible/good idea?? Well, if possible, give me a link. Seeing the real site gives me some full picture... pascal Thank you Pascal, I'm grateful for your time and help! White background would not be the solution. :-( I will send you a PM with a link so that you see what the website looks like. Thanks again. Link to comment Share on other sites More sharing options...
geolan Posted September 4, 2013 Share Posted September 4, 2013 thanks all have worked exept the search and contact block. Any idea since in the folder I only find .tpl files not .css. Thanks again Link to comment Share on other sites More sharing options...
PascalVG Posted September 4, 2013 Share Posted September 4, 2013 Hi Geolan, For search and contact block: I cannot see that you took out the first part of the lines yet: for search box - button: edit file: /modules/blocksearch/blocksearch.css (line19) #search_block_top .button { border: none; border-radius: 0; color: #fff; text-transform: uppercase; background: url(img/bg_search_submit.png) repeat-x 0 0 #101010; <<--- delete front part, and change color, like #884020 float: left; height: 25px; } so in the end we have something like this: #search_block_top .button { border: none; border-radius: 0; color: #fff; text-transform: uppercase; background: #884020; <<--- after we deleted front part, and changed color to #884020 float: left; height: 25px; } contact us back block (right-below on page) edit file: /modules/blockcontact/blockcontact.css (line 24) #contact_block a { display: block; margin-left: 60px; padding: 6px 8px; font: bold 10px Arial,Verdana,sans-serif; color: #fff; text-shadow: 0 -1px 0 #000; text-transform: uppercase; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: url(images/bloc_contact_a_bg.png) repeat-x 0 0 #000; <--- delete front part, and change #000 to desired color, like #884020 } so in the end we have something like this: #contact_block a { display: block; margin-left: 60px; padding: 6px 8px; font: bold 10px Arial,Verdana,sans-serif; color: #fff; text-shadow: 0 -1px 0 #000; text-transform: uppercase; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; background: #884020; <--- after we deleted front part, and changed #000 to #884020 } So, for both, try to take the front part of the lines out (i.e. the image) and then change the colour. Quite sure it works... pascal Link to comment Share on other sites More sharing options...
geolan Posted September 4, 2013 Share Posted September 4, 2013 thanks very much Pascal I'm grateful it has worked. Link to comment Share on other sites More sharing options...
PascalVG Posted September 4, 2013 Share Posted September 4, 2013 See that search is still black. did you manage that one as well? Link to comment Share on other sites More sharing options...
geolan Posted September 4, 2013 Share Posted September 4, 2013 i just want to change the button which i think is editing the image with search as i did to Facebook but where the writing should be is fine like that. thanks Link to comment Share on other sites More sharing options...
geolan Posted September 4, 2013 Share Posted September 4, 2013 just another questing ! down in the footer I have INFORMATION CATEGORY, where do i edit the contents since i don't need things like store , specials , new products etc. thanks again Link to comment Share on other sites More sharing options...
PascalVG Posted September 5, 2013 Share Posted September 5, 2013 Hi Geolan, easiest way to do this is: edit /themes/default/css/global.css (line 1986): #footer .block_various_links { padding: 15px 10px; display: none; <-- Add this. This will turn off the block with the links } Doing this, the three left over columns are not nicely spread out. To fix this, change in same file: line 581: .blockcategories_footer, #footer .myaccount, #block_various_links_footer,#social_block, #block_contact_infos { float: left; width: 300px; <-- change to 300px } and (line): #footer .myaccount { padding: 15px 20px; <-- change to 20px} That should do the trick, pascal Link to comment Share on other sites More sharing options...
geolan Posted September 11, 2013 Share Posted September 11, 2013 thanks it works Link to comment Share on other sites More sharing options...
ukwyspa Posted November 9, 2013 Share Posted November 9, 2013 Hi, thank U @PascalVG! You are the best I have a problem, top menu its great but how can i add categories images like in top menu in category-tree-branch (left) menu :/ i have no idea :/ Link to comment Share on other sites More sharing options...
ukwyspa Posted November 9, 2013 Share Posted November 9, 2013 ok i know <img src="{$link->getCatImageLink($category->link_rewrite, $node.id, 'category_small')|escape:'html'}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" width="{$categorySize.width}" height="{$categorySize.height}" /> .done Link to comment Share on other sites More sharing options...
PascalVG Posted November 10, 2013 Share Posted November 10, 2013 Hi ukwyspa, Yep, that should do it. Thanks for the feedback! pascal Link to comment Share on other sites More sharing options...
CHYPSET Posted February 2, 2014 Share Posted February 2, 2014 mouse, probably like this: if (!empty($is_intersected)) { $this->_menu .= '<li '.$selected.'>'; if ($category->id_image != null) // change into this red part $this->_menu .= '<a href="'.$category_link.'">'.' <img src="'._THEME_CAT_DIR_. $category->id_image.'-2.jpg" width="20" height=20"> '.$category->name.'</a>'; else $this->_menu .= '<a href="'.$category_link.'">'.$category->name.'</a>'; if (count($children)) ... (Add blue -2 to code above) :-) Explain a little more what you need, maybe there's another way to solve your problem? pascal Pascal você e muito bom parabéns. Link to comment Share on other sites More sharing options...
BernardWyatt Posted February 24, 2015 Share Posted February 24, 2015 Hello. I am trying to add colour options to attributes but I need to add a block to show the colour like red or black etc. I am not sure how to add this but I need to go one better. I need to show some colour as Red/White or Black/White and thus want to show a colour block with both colours. Can anyone help me how to do this and please note I am really not handy with any code etc. Link to comment Share on other sites More sharing options...
PascalVG Posted February 24, 2015 Share Posted February 24, 2015 Hi Bernard, Not fully sure if I understand your request well. Do I understand correctly, that you want to add some color attribute to a product, with various dual-tone values, like red/blue, black/white? If so: - Create the attribute, like 'Color' - Add a value - Call the color value something like 'Black/White' - instead of choosing a color from the color palette, you could choose a 'Texture' file, and make some small squares/rectangles graphics (gif/jpg) with both colors, like this: - Choose the graphics file and save - do this for all dual tones you need. Then: - Edit/add a product, and make combinations which use these color values - Go to front page, go to the product, and you will see the combined color shown: Hope this is what you needed. If not, please tell us some more details, and maybe add some quick sketch or so. pascal Link to comment Share on other sites More sharing options...
BaptisteLegoupil Posted October 29, 2015 Share Posted October 29, 2015 Hi ! In PS 1.6 how can i add categories thum in mega menu ? I have this code : foreach ($pages as $page) { $cms = new CMS($page['id_cms'], (int)$id_lang); $links = $cms->getLinks((int)$id_lang, array((int)$cms->id)); $selected = ($this->page_name == 'cms' && ((int)Tools::getValue('id_cms') == $page['id_cms'])) ? ' class="sfHoverForce"' : ''; $this->_menu .= '<li '.$selected.'>'; $this->_menu .= '<a href="'.$links[0]['link'].'">'.$cms->meta_title.'</a>'; $this->_menu .= '</li>'; } in getCMSMenuItems function. Can you help me Pascal ? Link to comment Share on other sites More sharing options...
BaptisteLegoupil Posted November 2, 2015 Share Posted November 2, 2015 up plz ! Link to comment Share on other sites More sharing options...
RIyaj Posted July 6, 2018 Share Posted July 6, 2018 (edited) Hi Pascal I need your help. I want to build my site with horizontal filter like the below site. Could you please help on this https://www.ties.com/gen-2.25-width+ties.com-brand+cotton-material+floral-patterned+black-colored+skinny-ties Edited July 6, 2018 by RIyaj Upload screenshot (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now