Hi, I have created a function that searches for a category in a category tree object and returns all the paths for it as an array of strings, please advice how I can improve it ? the result im getting now is : ["vehicles",["cars","mercedes"],["trucks","mercedes"],["motorcycles","BMW"]] i need it in one dimesional array like this : ["vehicles","cars","mercedes","trucks","mercedes","motorcycles","BMW"] here is also a plunker url for the same code im trying t solve : [Click Here](http://plnkr.co/edit/JOH63BuL55HgEtEYnVjd?p=preview) thanks in advance, please advice. var categories = {category:"vehicles",children:[ {category:"cars",children:[{category:"mercedes",children:[]}]}, {category:"trucks",children:[{category:"mercedes",children:[]}]}, {category:"motorcycles",children:[{category:"BMW",children:[]}]} ]}; function getnodes(nodes) { var arr=[]; if (!nodes.children.length) return nodes.category; else{ arr.push(nodes.category); for(var i =0 ; …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I have one simple logical question that I seem not to figure it out, sadly... We have a list of objects and I loop trough them, list of products. We need to create anchor maps for each category, so I did a comparison with temp variables to check the previous and current element value. How can I display only the first occurence of a series of values for each category ? Desired result: Category 1 - product 1 - product 2 - product 3 Category 2 - product 1 - product 2 - product 3 $previous = ''; …

Member Avatar
Member Avatar
+0 forum 2

Hi All, I am developing something for a client and I urgently need this solved. My client has a Magento store, which has several categories (say CatA and CatB). If someone purchases an item from CatA, I need Magento so send an email to admin@example.com. Is this possible? If so, how could I do it? *Thanks*

Member Avatar
+0 forum 0

hi i am new to wordpress. so i am getting lot of problems I am trying to display posts of specific category using the following code <?php $cat=$_GET["cat"]; $args=array('category'=>$cat); $posts_array = get_posts( $args ); foreach($posts_array as $posting) { echo $posting; } ?> But i am getting errors instead. Please anyone help me in getting the solution. Thanks in advance

Member Avatar
Member Avatar
+0 forum 2

Hi, how to make a category tree in php? Recently I've a table called 'category' and inside containt ID,Name,ParentID. Please give me a simple example code to do it. Very appreciated if you could help me to solve this problem.

Member Avatar
Member Avatar
+0 forum 5

hello, i'm using this pagination script and it works smoothly , but i want to display products when i pressed my category menu(php created), this is the code ,i'm trying configure pagination with my category menu, but it's not working. please help me. i'm newbie in php. <?php include('connect.php'); if(isset($_GET['category'])) { $category=$_GET['category']; $qry="select * from datas_disp where category=$category ORDER BY ID DESC"; $res=mysql_query($qry); $tableName="$res"; // if i pressed categorm menu "$tableName" want to get the category number and fetch datas from "datas_disp(table name)" , means at normal case datas fetch through the default pagination script($tableName="datas_disp";), but at the time of …

Member Avatar
Member Avatar
+0 forum 3

Can any one help me to know about the api which will give the full list of amazon categories.

Member Avatar
Member Avatar
+0 forum 2

1.Category 2.Category_sub note: category_name field in Category_sub table is im using as category_id hope u get after see d snap shot i want to do in my category_sub table i am storing category_id frm category table i am attacting the screen shot of table.. i want when i click on Business ..the page ll open which contain the subcategory of bussiness only(im calling that page in iframe by giving target of that page in link)..this also im able to do but the way im doing is very lengthy and i feel there is a better way because i need to …

Member Avatar
Member Avatar
+0 forum 1

Hi Good friends, I have an index page for my blog that pulls up all posts to the page. I have a group of posts i have assigned to a category named 'Diary'. I want to prevent posts in the 'Diary' category from showing up on the index(home) page. The code in the index page that pulls up all posts is as follows <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> <div <?php post_class(); ?>> <span class="postlabel"><a href="<?php the_permalink() ?>"><span><?php the_time('d'); ?></span><?php the_time('M'); ?></a></span> <h2 class="post-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <p class="info"> <span class="catinfo"><?php _e('Filed in ', 'Mflat');?><?php the_category(' …

Member Avatar
Member Avatar
+0 forum 2

Hello everyone, I'm having trouble with Joomla non-existing category re-direct problem. I cannot seem to find the proper rewrite url line for .htaccess file for the following problem. I have my website http://www.dubrovnik.com I'd like to send user to my 404 Page whenever user request for non-existing link. I've managed to do it when, and it worked (IT IS DISABLED NOW ON PURPOSE) in the scenario where i type as url for example http://www.dubrovnik.com/some_misspelled_url.html, but the problem comes when I have a sub folder or non-existing Joomla category in my url. Example: http://www.dubrovnik.com/city-life - this is a working category but …

Member Avatar
Member Avatar
+0 forum 1

Hi every one. i am facing issue regarding displaying Product by category wise. i have two table 1st, product category and 2nd product details. i have foriegn in second table. i am attaching three file 1st template so you can undersatnd what i am tring to do and other files are tables pictures to show you my database scema. Help me to achieve my target.

Member Avatar
Member Avatar
+0 forum 4

Hi everyone, I have been active on this forum, but I changed jobs and cannot receive my new password because I cannot get to my old email address, so I made a new account. It seems DaniWeb has been standing still the last year. There are new frameworks for web development, and one is getting more popular than the other. For example: JSP is not the most desired Java webframework. I'd like to ask for new categories, and especially **Wicket**. Wicket has grown out of pubery and is now a good choice for a Java web application with very many …

Member Avatar
Member Avatar
+0 forum 4

Hi I'm using Auctionpress to make a ebay like website. I have over 300 categories you can list an item in. When user is listing a item it only gest a list box with all the categories..... and then has to go throught all them to find the right one. Instead of that, I want the user to first see all the top parent categories, when selects one gets all the child categories in it, and so forth, until he gets to final category.... just like in ebay.... i was looking into the code and found this ` // LOOP …

Member Avatar
Member Avatar
+0 forum 2

Hi Guys, Is there a way to put home videos on the iPhone, without it being classed as a Film or Music Video in iTunes? I like to think of Videos, Films and Music Videos all as separate groups... Unless Apple considers films, movies and videos to be the same.

Member Avatar
+0 forum 0

Hi Friends I am trying to get the value of select dropdown item in a text box, but i am unable to get it. I am using ajax for dropdowm method. please any one can help one.php [CODE]<?php session_start(); include("config.php"); // Check, if username session is NOT set then this page will jump to login page if (!isset($_SESSION['username'])) { header('Location: index.php'); } include('func.php'); ?> <script language = javascript> $(document).ready(function() { $('#wait_1').hide(); $('#category_code').change(function(){ $('#wait_1').show(); $('#result_1').hide(); $.get("func.php", { func: "category_code", drop_var: $('#category_code').val() }, function(response){ $('#result_1').fadeOut(); setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400); }); return false; }); }); function finishAjax(id, response) { $('#wait_1').hide(); $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); } </script> …

Member Avatar
Member Avatar
+0 forum 1

The End.