Search Results

Search found 3275 results on 131 pages for 'categories'.

Page 4/131 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Getting All categories in external page.

    - by Harsha
    This is very basic magento question i guess. I want to first get all the store categories, then loop through them to get their sub-categories and products and similarly continue till the last sub-category. I will be using this in an external page having Mage::app() declared at the top of the page. I am not aware of the Magento API's(if thats wat they are called) to use to get this functionality. Remember I am not using this in any of the templates, so something like getCurrentCategory() will not work here i guess. Also please guide if there are any good resources to search for particular functionality in magento and API's to implement it, or am i doomed to go through their phpdoc to know the list of methods. Any help here will be greatly appreciated, Thanks.

    Read the article

  • Rename outlook2007 categories not working

    - by Bob Rivers
    Hi, I'm new to outlook 2007 and I'm trying to rename a category. Acordingly to MS, I can achieve it by just renaming it: http://office.microsoft.com/en-us/outlook/HA012316361033.aspx But as soon as I click the OK button, confirming the change, it returns to it's original value. For instance, if I rename the "Blue Category" to "Home" it will accept without erros. But, when I click again in the Categorize icon, I'll see that the "Blue Category" is still there, and my "Home" category does not exist. Has someone experienced this kind of problem? TIA, Bob

    Read the article

  • Filter sub-categories like in layered navigation

    - by russjman
    I created a new template file catalog/category/list.phtml. This is to display all sub categories of the current category. I have layered navigation which is displaying sub-categories as one of the filters, but I want this new template to work with these filters as well. Right now when i click the subcategory filter, it filters all products on the page, but still displays all categories of the parent category. $_filters is how i am trying to access these filters, but i get nothing. Is there something i am not initializing correctly to have access to these filters from the layered navigation. <?php $_helper = $this->helper('catalog/output'); $_filters = $this->getActiveFilters(); echo $_filters; if (!Mage::registry('current_category')) return ?> <?php $_categories=$this->getCurrentChildCategories() ?> <?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?> <?php if($_count): ?> <?php foreach ($_categories as $_category): ?> <?php if($_category->getIsActive()): ?> <?php $cur_category=Mage::getModel('catalog/category')->load($_category->getId()); $layer = Mage::getSingleton('catalog/layer'); $layer->setCurrentCategory($cur_category); $_imgHtml = ''; if ($_imgUrl = $this->getCurrentCategory()->getImageUrl()) { $_imgHtml = '<img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" class="category-image" />'; $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image'); } echo $_category->getImageUrl(); ?> <div class="category-image-box"> <div class="category-description clearfix" > <div class="category-description-textbox" > <h2><span><?php echo $this->htmlEscape($_category->getName()) ?></span></h2> <p><?php echo $this->getCurrentCategory()->getDescription() ?></p> </div> <a href="<?php echo $this->getCategoryUrl($_category) ?>" class="collection-link<?php if ($this->isCategoryActive($_category)): ?> active<?php endif ?>" >See Entire Collection</a> <a href="<?php echo $this->getCategoryUrl($_category) ?>"><?php if($_imgUrl): ?><?php echo $_imgHtml ?><?php else: ?><img src="/store/skin/frontend/default/patio_theme/images/category-photo.jpg" class="category-image" alt="collection" /><?php endif; ?></a> </div> <?php echo '<pre>'.print_r($_category->getData()).'</pre>';?> </div> <?php endif; ?> <?php endforeach ?> <?php endif; ?>

    Read the article

  • wordpress categories and their subcategories

    - by Ayrton
    Hi I'm looking to obtain all the (parent) categories with their children accordingly (assuming you don't have grandchildren) and make the following structure <div class="box"> <h3><a href="#">Parent Category I</a></h3> <ul> <li><a href="#">sub cat 1</a></li> <li><a href="#">sub cat 2</a></li> <li><a href="#">sub cat 3</a></li> </ul> </div> <div class="box"> <h3><a href="#">Parent Category II</a></h3> <ul> <li><a href="#">sub cat 1</a></li> <li><a href="#">sub cat 2<</a></li> <li><a href="#">sub cat 3</a></li> </ul> </div> I figured it's something like (don't mind the syntax) however I don't know how to obtain those (parent)categories and their children: $parents = ... ; foreach($parents as $parent){ <div> <h3>$parent</h3> $children = ...; <ul> foreach ($children as $child){ <li>$child</li> } </ul> </div> }

    Read the article

  • Static library woes in iPhone 3.x with categories and C libraries

    - by hgpc
    I have a static library (let's call it S) that uses a category (NSData+Base64 from MGTwitterEngine) and a C library (MiniZip wrapped by ZipArchive). This static library is used in an iPhone 3.x project (let's call it A). To be able to use the MiniZip library I included its files in project A as well as the static library S. If not I get compilation errors. Project A works fine on the simulator. When I run it on the device, I get unrecognized selector errors when the category is used. As pointed out here, it seems there's a linker bug that affects categories in iPhone 3.x (http://stackoverflow.com/questions/1147676/categories-in-static-library-for-iphone-device-3-0). The workaround is to add -all_load to the Other Linker Flags of the project that references the static library. However, if I do this then I get duplicate symbol errors because I included the MiniZip libraries in project A. A workaround is to include the category files in project A as well. If I do this, project A works well in the device, but fails to build on the simulator because of duplicate symbol errors. How should I set up project A to make it work on the simulator and the device with the same configuration?

    Read the article

  • Dynamically create categories for SQLite pivot/crosstab

    - by alj
    I realise it is possible to create a crosstab within sqlite, but is it possible to dynamically determine the relevant categories/columns at runtime rather than hardcoding them? Given the following example, it can get rather tedious ... SELECT shop_id, sum(CASE WHEN product = 'Fiesta' THEN units END) as Fiesta, sum(CASE WHEN product = 'Focus' THEN units END) as Focus, sum(CASE WHEN product = 'Puma' THEN units END) as Puma, sum(units) AS total FROM sales GROUP BY shop_id I managed to do this in SQLServer in a stored proceedure before and wondered if there was anything equivalent.

    Read the article

  • Minutia on Objective-C Categories and Extensions.

    - by Matt Wilding
    I learned something new while trying to figure out why my readwrite property declared in a private Category wasn't generating a setter. It was because my Category was named: // .m @interface MyClass (private) @property (readwrite, copy) NSArray* myProperty; @end Changing it to: // .m @interface MyClass () @property (readwrite, copy) NSArray* myProperty; @end and my setter is synthesized. I now know that Class Extension is not just another name for an anonymous Category. Leaving a Category unnamed causes it to morph into a different beast: one that now gives compile-time method implementation enforcement and allows you to add ivars. I now understand the general philosophies underlying each of these: Categories are generally used to add methods to any class at runtime, and Class Extensions are generally used to enforce private API implementation and add ivars. I accept this. But there are trifles that confuse me. First, at a hight level: Why differentiate like this? These concepts seem like similar ideas that can't decide if they are the same, or different concepts. If they are the same, I would expect the exact same things to be possible using a Category with no name as is with a named Category (which they are not). If they are different, (which they are) I would expect a greater syntactical disparity between the two. It seems odd to say, "Oh, by the way, to implement a Class Extension, just write a Category, but leave out the name. It magically changes." Second, on the topic of compile time enforcement: If you can't add properties in a named Category, why does doing so convince the compiler that you did just that? To clarify, I'll illustrate with my example. I can declare a readonly property in the header file: // .h @interface MyClass : NSObject @property (readonly, copy) NSString* myString; @end Now, I want to head over to the implementation file and give myself private readwrite access to the property. If I do it correctly: // .m @interface MyClass () @property (readonly, copy) NSString* myString; @end I get a warning when I don't synthesize, and when I do, I can set the property and everything is peachy. But, frustratingly, if I happen to be slightly misguided about the difference between Category and Class Extension and I try: // .m @interface MyClass (private) @property (readonly, copy) NSString* myString; @end The compiler is completely pacified into thinking that the property is readwrite. I get no warning, and not even the nice compile error "Object cannot be set - either readonly property or no setter found" upon setting myString that I would had I not declared the readwrite property in the Category. I just get the "Does not respond to selector" exception at runtime. If adding ivars and properties is not supported by (named) Categories, is it too much to ask that the compiler play by the same rules? Am I missing some grand design philosophy?

    Read the article

  • List categories with checkbox in Wordpress Options?

    - by Keith Donegan
    Hi Guys, How would I go about displaying all of a site’s categories in checkboxes in my options panel? I can get a dropdown select menu to work, I just have no idea how to implement checkboxes. Code Here from Net Tuts: http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-better-wordpress-options-panel/ http://pastie.org/885320 Thanks in advance.

    Read the article

  • Rails, searchlogic choose categories with checkboxes

    - by atmorell
    Hello, I am useing searchlogic to search some paintings. Each painting belong to a single category. What I would like to do is add multiple checkboxes to my search form, so that users can mark multiple categories. (joined with or) Is this possible with searchlogic? The query I am looking for is something like this: SELECT * FROM paintings WHERE category LIKE "white" OR category LIKE "red"... f.check_box :category (white) f.check_box :category (black) f.check_box :category (red) f.check_box :category (green) etc.

    Read the article

  • recursive function to get all the child categories

    - by user253530
    Here is what I'm trying to do: - i need a function that when passed as an argument an ID (for a category of things) will provide all the subcategories and the sub-sub categories and sub-sub-sub..etc. - i was thinking to use a recursive function since i don't know the number of subcategories their sub-subcategories and so on so here is what i've tried to do so far function categoryChild($id) { $s = "SELECT * FROM PLD_CATEGORY WHERE PARENT_ID = $id"; $r = mysql_query($s); if(mysql_num_rows($r) > 0) { while($row = mysql_fetch_array($r)) echo $row['ID'].",".categoryChild($row['ID']); } else { $row = mysql_fetch_array($r); return $row['ID']; } } If i use return instead of echo, i won't get the same result. I need some help in order to fix this or rewrite it from scratch

    Read the article

  • Feeding a Drill Down Menu with categories, subcategories and subSubcategories from a database

    - by Hassan
    Hi everyone, I have a Drill Down menu and I want to have it gets its elements from a database, I am using php and MySQL and the table (categories) looks like this : http://yfrog.com/jctablehsj I can't figure out how I can extract these information in a way I could put it inside the Drill Down Menu ! I found the recursive method (with LEFT JOINs) and the nested method which I barely understood and again I couldn't apply it to the Drill Down Menu. I found that some people found out a solution with left join and group by but couldn't understand or copy their example ! I would be more than gratefull if you could give me the extact of the query. Thanks a lot for your hard work, Hassan

    Read the article

  • friendly url in categories

    - by ntan
    Hi to all, i am trying to use friendly url for my categories. Example Database cat_id | parent_id | name | url 1 0 cat1 cat1 2 1 cat2 cat2 My approach to do is to pass the parameter cat with url value for example show.php?cat=cat1 and in .htaccess i must rewrite to /cat1 BUT what about when i want to access cat2. I want to rewrite as cat1/cat2 so the parameter is show.php?cat=cat1/cat2 and then parse the value to secure that cat2 belong to cat1. And so on. I am not using MVC so i have to do it on my own. Please if any other solutions is better please advice or suggest me reading Thank in advance.

    Read the article

  • Query Only Specified Number Of Items From Parent/Child Categories

    - by RogeR
    I'm having trouble figureing out how to query every item in a certain category and only list the newest 10 items by date. Here is my table layout: download_categories category_id (int) primary key title (var_char) parent_id (int) downloads id (int) primary key title (var_char) category_id (int) date (date) I need to query every file in a main category that lets say has 100 items and 5 child categories and only spit out the last 10 added. I have functions right now that just add up all the files so I can get a count by category, but I can't seem to modify the code to only display a certain amount of items based on the date.

    Read the article

  • What is the best way to add categories to posts - Ruby on Rails blog...

    - by bgadoci
    I am new to Ruby and Rails so bear with me please. I have created a very simple blog application with both posts and comments. Everything works great. My next question regarding adding categories. I am wondering the best way to do this. As I can't see too far in front of me yet when it comes to Rails I thought I would ask. To be clear, I would like that a single post can have multiple categories and a category can have multiple posts. Is the best way to do this to create a 'categories' table and then use the posts and categories models to do has_many :posts, has_many :categories? Would I also then set the routes.rb such that posts are embedded under categories? Or is there an easier way by simply adding a category column to the existing posts table? (in which case I would imagine having multiple categories would be difficult).

    Read the article

  • MySql products and categories tables using php and json

    - by Romina Mora
    I have just started learning all this coding language and the teacher is asking us to do the following. I know it may sound really easy for people who do this full time or have more time coding. The teacher is always telling us to GOOGLE everything and I have tried too many sites but I haven't found anything that helps me at all. I need to write two JSON documents (products and categories) using PHP that will dynamically read values from my MySQL database. When each document is called upon, it will return perfectly formatted JSON that will validate using http://jsonlint.com/ Honestly I don't know what to do. I don't understand PHP and now this JSON thing is making it more confusing.

    Read the article

  • mongoDB many to many with one query?

    - by PowderKeg
    in mysql i use JOIN and one query is no problem. what about mongo? imagine categories and products. products may have more categories. categories may have more product. (many to many structure) and administrator may edit categories in administration (categories must be separated) its possible write product with categories names in one query? i used this structure categories { name:"categoryName", product_id:["4b5783300334000000000aa9","5783300334000000000aa943","6c6793300334001000000006"] } products { name:"productName", category_id:["4b5783300334000000000bb9","5783300334000000000bb943","6c6793300334001000000116"] } now i can simply get all product categories, and product in some category and categories alone for editation. but if i want write product with categories names i need two queries - one to get product categories id and second to get categories names from categories by that ids. is this the right way? or this structure is unsuitable? i would like to have only one query but i dont know if its possible.

    Read the article

  • Relating categories with tags using SQL

    - by Pablo
    I want be able to find tags of items under the a certain category. Following is example of my database design: images +----------+-----+-------------+-----+ | image_id | ... | category_id | ... | +----------+-----+-------------+-----+ | 1 | ... | 11 | ... | +----------+-----+-------------+-----+ | 2 | ... | 12 | ... | +----------+-----+-------------+-----+ | 3 | ... | 11 | ... | +----------+-----+-------------+-----+ | 4 | ... | 11 | ... | +----------+-----+-------------+-----+ images_tags +----------+--------+ | image_id | tag_id | +----------+--------+ | 1 | 53 | +----------+--------+ | 3 | 54 | +----------+--------+ | 2 | 55 | +----------+--------+ | 1 | 56 | +----------+--------+ | 4 | 57 | +----------+--------+ tags and categories each have their own table relating the id to an actual name(text). So my question is how will i find out that images with category_id=11 have have the tag_id 53 54 55 56 57. In other words how to find the tags that images in certain category have?

    Read the article

  • How to Get Control Panel Categories (Groups) on Windows Vista and Windows 7

    - by Bill
    Is there a way to get a listing of control panel categories on Windows Vista and Windows 7 using the shell? Is there a way to determine which category an applet is assigned to using conical Names using the shell? such as Microsoft.Mouse is in which category? I have some code that works nicely to display control panel applet names obtained from the shell in a TListView in a Vista Classic ungrouped list. I'd like to try to group the applet names in the TListView similar to Control Panel Classic Grouped by Category in Vista. Bill

    Read the article

  • WordPress: Related Posts by Tags, but in the Same Categories

    - by Norbert
    I'm using the script below to get related posts by tags, but noticed that if I have a picture of a bird tagged white and a table also tagged white, the table will show up in the related posts section of the bird. Is there a way to only get posts that match at least one of the categories, so bird and table won't be related, unless they share one category? I tried setting an category__in array inside $args, but no luck! <?php $tags = wp_get_post_tags($post->ID); if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id; $args=array( 'tag__in' => $tag_ids, 'post__not_in' => array($post->ID), 'showposts'=>6, // Number of related posts that will be shown. 'caller_get_posts'=>1 ); $my_query = new wp_query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) { $my_query->the_post(); ?> <?php if ( get_post_meta($post->ID, 'Image', true) ) { ?> <a style="text-decoration: none;" href="<?php the_permalink(); ?>"> <img style="max-height: 125px; margin: 15px 10px; vertical-align: middle;" src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, "Image", $single = true); ?>&w=125&zc=1" alt="" /> </a> <?php } ?> <?php } } } ?>

    Read the article

  • wordpress displaying the post in a specific categories

    - by Juliver Galleto
    I have this php code below for displaying the post from the specific categories. <ul id="sliderx"> <?php query_posts('category_name=slideshow&showposts=10'); while (have_posts()) : the_post(); echo "<li>".the_content()."</li>"; endwhile;?> </ul> as you can see, it display those post in the category slideshow and the structure of that should be this. <ul id="sliderx"> <li>the post 1</li> <li>the post 2</li> <li>the post 3</li> </ul> but the output that is generated is this. <ul id="sliderx"> <p>three</p> <li></li><p>two</p> <li></li><p>one</p> <li></li> </ul> and the generated structure should not look like that and it looks nasty at all, so im having a problem on this on how to display it properly like to display into this structure. <ul id="sliderx"> <li>the post 1</li> <li>the post 2</li> <li>the post 3</li> </ul> So Im wondering if there's someone who could tell me how to fix this. Im open into any suggestions, recommendations and suggestions. Thank you.

    Read the article

  • [wordpress] Loop through a specific category on single.php

    - by petrescu
    I've created a custom page and it is set as my homepage, within this custom page I am pulling out the latest post from a specific category, I've also created a form of pagination which when clicked upon will take the user to single.php. My intention for the single.php is to have two custom loops. Custom loop one I want single.php to distinguish that it has came from the homepage and loop through all of the posts tagged with the same category as the one on the homepage. Some of these posts will have to be tagged with more than one category, so the loop will have to know to ignore the other categories and just pay attention to the category in question. Does that make sense? Custom loop two If the user hasn't arrived from the homepage, single.php will just act as it normally does i.e, if the user comes from index.php (the blog) they will be taken to this second loop (blog post) However I don't seem to be able to make the distinction between the two loops, I might be over complicating matters, as I've got a loop which wraps everything together and then I have a loop for my custom pagination. Here is the code below to show you what I'm talking about custompage.php (set to home) - This works just fine but I'll post it just incase anyone is able to tidy it up <?php query_posts('cat=1'); ?> <?php $myPosts = new WP_Query(); $myPosts->query('showposts=1'); if (have_posts()) : while ($myPosts->have_posts()) : $myPosts->the_post(); ?> <script type="text/javascript">$.backstretch("<?php $key="image"; echo get_post_meta($post->ID, $key, true);?>");</script> <div id="post-<?php the_ID(); ?>" class="info"> <h2><?php the_title(); ?></h2> <ul class="nav"> <?php query_posts('posts_per_page=1&offset=1'); the_post(); ?> <li class="prev"><a href="<?php the_permalink() ?>">Previous</a></li> <?php wp_reset_query(); ?> <li class="next"></li> </ul> </div> <!-- end .info --> <?php endwhile; endif; ?> <?php wp_reset_query(); ?> single.php - Currently broken <?php if( in_category('1') ) { ?> <!-- start --> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>" class="info"> <script type="text/javascript">$.backstretch("<?php $key="image"; echo get_post_meta($post->ID, $key, true);?>");</script> <h2><?php the_title(); ?></h2> <ul class="nav"> <li class="prev"><?php previous_post_link('%link', '&nbsp;', 'true', '1') ?></li> <li class="next"><?php next_post_link('%link', '&nbsp;', 'true', '1'); ?></li> <!--li class="prev"><?php //previous_post_link('%link', '%title;', 'true', '1') ?></li> <li class="next"><?php //next_post_link('%link', '%title;', 'true', '1'); ?></li--> </ul> </div> <!-- end .info --> <?php endwhile; else: ?> <?php endif; ?> <!-- end --> <?php }else{ ?> <div id="content" class="widecolumn" role="main"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h2><?php the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?> </div> </div> <?php comments_template(); ?> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> </div> <?php } ?> The problem I seem to be running into is when a post has been tagged with two categories, wordpress doesn't seem to be able to make the distinction between the two categories and instead of carrying on to the next category it breaks and defaults to the second loop.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >