Jump to content

oracle765

Members
  • Posts

    219
  • Joined

  • Last visited

Posts posted by oracle765

  1. Hi professionals

     

    I am stuck with some css as I don't really know anything about it, basically on our loans page compareandchoose.com.au/loans the writing and text boxes are all over the place and I cannot figure out what to do.

     

    I have found that in the style.css file that it is something to do with the dollor class but I have tried a few thing and it keeps messing up.

     

     

    I will attached an image too for clarity sake

     

     

     

     

    style.css

    loans.php

    post-166889-0-74506500-1393219068_thumb.jpg

  2. Hi Css expert

     

    My website has been written by someone else and I am stuck with some css issues.  As I do not know css at all hence why I am asking here, I do not know even which of the css files to show as to where the problem could be so I will send the page code with the css files that are in my website along with the attached image and hopefully I can be pointed in the right direction.

     

    What I am looking for in the submenu is for the submenu options to be in an ordered list EG left to right top to bottom but they seem to be all over the submenu, can anyone assist

     

    Please find attached the code for that page in question

     

    thanks

    post-166889-0-59604500-1393067896_thumb.png

    good.php

  3. Hi again

     

    Still baffled with this array

     

    how do I actually drill down to the min price and number of stores in the array so I can show in format like this

     

     

    item, description, number of stores, prices from, CompareButton(which goes to the stores)

     

     

    thanks in advance

  4.  [2] => Array
                                                    (
                                                        [name] => Store
                                                        [attributeURL] => http://www.au.shopping.com/washing-machines/washing-machine/products~all-store~MS-1?oq=washing_machine&linkin_id=8084586
                                                        [attributeValues] => Array
                                                            (
                                                                [attributeValue] => Array
                                                                    (
                                                                        [0] => Array
                                                                            (
                                                                                [name] => Appliances Online
                                                                                [attributeValueURL] => http://www.au.shopping.com/washing-machines/washing-machine+store-appliances-online-4114784/products~linkin_id-8084586
                                                                                [id] => store_appliances_online_4114784
                                                                                [matchingItemsCount] => 76
                                                                            )
    
                                                                        [1] => Array
                                                                            (
                                                                                [name] => Masters Home Improvement
                                                                                [attributeValueURL] => http://www.au.shopping.com/washing-machines/washing-machine+store-masters-home-improvement-9689/products~linkin_id-8084586
                                                                                [id] => store_masters_home_improvement_9689
                                                                                [matchingItemsCount] => 19
                                                                            )
    
                                                                        [2] => Array
                                                                            (
                                                                                [name] => The Good Guys
                                                                                [attributeValueURL] => http://www.au.shopping.com/washing-machines/washing-machine+store-the-good-guys/products~linkin_id-8084586
                                                                                [id] => store_the_good_guys
                                                                                [matchingItemsCount] => 3
                                                                            )
    
                                                                        [3] => Array
                                                                            (
                                                                                [name] => Mr Appliance
                                                                                [attributeValueURL] => http://www.au.shopping.com/washing-machines/washing-machine+store-mr-appliance-9689/products~linkin_id-8084586
                                                                                [id] => store_mr_appliance_9689
                                                                                [matchingItemsCount] => 3
                                                                            )
    
                                                                    )
    
                                                                [matchedValueCount] => 4
                                                                [returnedValueCount] => 4
    
    

    Hi Ch0cu3r

     

    I aint touch any of the code since you last mailed me but I have noticed that in the array its trying to out put the store name but I only seem to get on store even though there are 4 stores in there as shown

     

    Any ideas why its only showing appliances online and not the rest?

     

    again for clarity sake I have attached the page code, but to be fair I have never changed anything

     

     

    Thanks

    Alan

     

     

    shopping.php

  5. That seems to have done it and extracted the images, thanks again, although I have no idea what is happening lol these multidimensional arrays are frying my brain

     

    I just have to figure out how to get the minimum price in the array and why some of the Buy froms and Manufacturers are blank after all I am aiming along the lines of 3 products found, prices from $$$ then click compare which shows the different stores prices if you know what I mean

  6. //THIS ONE WORKS OK
    
    foreach($json_arr ['categories']['category'] as $arr){
    
        // $arr will be an array of each url data
    	echo "<b> Link </b><a href=" .$arr['categoryURL'].">Apple</a>"?><br /><br /><?php 
    
    } 
    
    foreach($json_arr ['categories'] as $categories) 
    {		
        foreach($categories ['category'] as $category) 
        {
            echo "<b> Link </b>" .$category['categoryURL'] ,"<br/>";
    		/*
            foreach($category['item'] as $item)
            {
                 // get the sub array key
                 $key = key($item);
    
                 echo "<p><b> Name </b> " .implode(',', $item[$key]['name']), " <br> manufacturer </b>",$item[$key]['manufacturer'] ,"<p>";
    
                 // get item description, 
                 // for offer use description key
                 // for product use fullDescription key
                 echo "<p><b>Description</b> " . (($key == 'offer') ? $item[$key]['description'] : $item[$key]['fullDescription']) . "</p>";
    
                // display product images 
    			
                echo "<p><b>Images: </b>";
                foreach($item[$key]['imageList']['image'] as $image)
                {
                    echo "<img src='" .$image['sourceUrl']. "' />   ";
                }
                echo "</p>";
    			
                // the store logo and name
                echo "<p><b>Store: </b> <img src='" .$item[key]['store']['logo']['sourceURL']. "' /> " .$item[key]['store']['name']. "</p>";
                echo "<hr />";
           } */
       }
    }
    

    Hi ive commented out the inner foreach loops to try and figure out whats going on  but it seems not to work still

     

    im a bit confused as the second attachment loop works

     

     

     

     

     

     

  7. foreach ($json_arr['categories'] as $categories) 
    {		
        foreach($categories['category'] as $category) 
        {
            echo "<b> Link </b>" .$category['categoryURL'] ,"<br/>";
    		 
            foreach($category['item'] as $item)
            {
                 // get the sub array key
                 $key = key($item);
    
                 echo "<p><b> Name </b> " .implode(',', $item[$key]['name']), " <br> manufacturer </b>",$item[$key]['manufacturer'] ,"<p>";
    
                 // get item description, 
                 // for offer use description key
                 // for product use fullDescription key
                 echo "<p><b>Description</b> " . (($key == 'offer') ? $item[$key]['description'] : $item[$key]['fullDescription']) . '</p>';
    
                // display product images
                echo '<p><b>Images: </b>';
                foreach($item[$key]['imageList']['image'] as $image)
                {
                    echo '<img src="'.$image['SourceUrl'].'" />   ';
                }
                echo '</p>';
    
                // the store logo and name
               // echo '<p><b>Store: </b> <img src="' $item[key]['store']['logo']['sourceURL']'" /> ' .$item[key]['store']['name'] '</p>';
                echo '<hr />';
           }
       }
    }
    

    Hi again

     

    ive tried this today but nothing seems to be coming back again

     

    my dreamweaver was showing an error on the second last line of echo code that I commented out because I could not figure it out and I did notice a semi colon missing from an echo statement above which I fixed but its still showing nothing

     

     

    here is what I have so far, I think it might be just a formatting error with the " ' etc but not sure

  8. print_r($json_arr);
    
    		foreach ($json_arr ['categories'] as $categories) 
    		{		
    			foreach($categories['category'] as $category) 
    			{
    				echo "<b> Link </b>" .$category['categoryURL'] ,"<br/>";
    				 
    				foreach($category['item'] as $Option) 
    				{
                  	echo "<b> Name </b> " .implode(',', $Option['name']), " <br> manufacturer </b>",$Option['manufacturer'] ,"<br />";
    				}
            	}
    		}
    

    PS ive tried this but its returning nothing

  9. [categories] => Array
            (
                [intActualCategoryCount] => 1
                [category] => Array
                    (
                        [0] => Array
                            (
                                [name] => Washing Machines
                                [categoryURL] => http://www.au.shopping.com/washing-machines/washing-machine/products?oq=washing_machine&linkin_id=8084586
                                [items] => Array
                                    (
                                        [matchedItemCount] => 92
                                        [returnedItemCount] => 5
                                        [pageNumber] => 1
                                        [item] => Array
                                            (
                                                [0] => Array
                                                    (
                                                        [offer] => Array
                                                            (
                                                                [id] => PxR1LOEEcM0Vu81EqNbqAw==
                                                                [used] => 
                                                                [featured] => 
                                                                [smartBuy] => 
                                                                [name] => 5.5kg LG Top Load Washing Machine WTH550
                                                                [description] => Best value is guaranteed when you buy the 5.5kg LG Top Load Washing Machine WTH550 from Appliances Online. Trusted by over 300,000 customers, Appliances Online is the largest online appliance retailer in Australia.
                                                                [manufacturer] => LG
                                                                [imageList] => Array
                                                                    (
                                                                        [image] => Array
                                                                            (
                                                                                [0] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di61.shoppingshadow.com/images/di/50/78/52/314c4f4545634d305675383145714e62714177-100x100-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=1&pr=1&lks=145181&fks=145181
                                                                                        [height] => 100
                                                                                        [width] => 100
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [1] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di61.shoppingshadow.com/images/di/50/78/52/314c4f4545634d305675383145714e62714177-200x200-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=1&pr=1&lks=145181&fks=145181
                                                                                        [height] => 200
                                                                                        [width] => 200
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [2] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di61.shoppingshadow.com/images/di/50/78/52/314c4f4545634d305675383145714e62714177-300x300-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=1&pr=1&lks=145181&fks=145181
                                                                                        [height] => 300
                                                                                        [width] => 300
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [3] => Array
                                                                                    (
                                                                                        [sourceURL] => http://img.shoppingshadow.com/sc/ds/no_image_100X100.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=1&pr=1&lks=145181&fks=145181
                                                                                        [height] => 400
                                                                                        [width] => 400
                                                                                        [available] => 
                                                                                    )
    
                                                                                [4] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di61.shoppingshadow.com/images/di/50/78/52/314c4f4545634d305675383145714e62714177-263x370-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=1&pr=1&lks=145181&fks=145181
                                                                                        [height] => 370
                                                                                        [width] => 263
                                                                                        [available] => 1
                                                                                    )
    
                                                                            )
    
                                                                    )
    
                                                                [stockStatus] => in-stock
                                                                [basePrice] => Array
                                                                    (
                                                                        [value] => 585.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [tax] => Array
                                                                    (
                                                                        [value] => 0.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [shippingCost] => Array
                                                                    (
                                                                        [value] => 0.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [totalPrice] => Array
                                                                    (
                                                                        [value] => 585.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [originalPrice] => Array
                                                                    (
                                                                        [value] => 829.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [offerURL] => http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=130&BEFID=1897&aon=%5E1&MerchantID=427149&crawler_id=1905980&dealId=PxR1LOEEcM0Vu81EqNbqAw%3D%3D&url=http%3A%2F%2Fad.doubleclick.net%2Fclk%3B272924216%3B98885278%3Bd%3Fhttp%3A%2F%2Fwww.appliancesonline.com.au%2F55kg-lg-top-load-washing-machine-wth550%2F%3Futm_source%3Dshoppingcom%26utm_medium%3Dcse%26utm_campaign%3Dtop_load_washing_machines%26utm_content%3DWTH550&linkin_id=8084586&Issdt=140217064107&searchID=v3.46899dc104de95cd9ad5&DealName=5.5kg+LG+Top+Load+Washing+Machine+WTH550&dlprc=585.0&AR=1&NG=1&NDP=2&PN=1&ST=7&FPT=DSP&NDS=&NMS=&MRS=&PD=&brnId=14305&IsFtr=0&IsSmart=0&op=&CM=&RR=1&IsLps=0&code=&acode=217&category=&HasLink=&ND=&MN=&GR=&lnkId=&SKU=WTH550
                                                                [store] => Array
                                                                    (
                                                                        [name] => Appliances Online
                                                                        [logo] => Array
                                                                            (
                                                                                [sourceURL] => http://img.shopping.com/cctool/merch_logos/427149.gif
                                                                                [height] => 31
                                                                                [width] => 88
                                                                                [available] => 1
                                                                            )
    
                                                                        [phoneNumber] => 1300 000 500
                                                                        [ratingInfo] => Array
                                                                            (
                                                                                [reviewCount] => 81
                                                                                [rating] => 4.74
                                                                                [ratingImage] => Array
                                                                                    (
                                                                                        [sourceURL] => http://img.shopping.com/sc/mr/sdc_checks_45.gif
                                                                                        [height] => 18
                                                                                        [width] => 91
                                                                                    )
    
                                                                                [reviewURL] => http://www.au.shopping.com/xMR-store_appliances_online_4114784~MRD-427149~S-1~linkin_id-8084586
                                                                            )
    
                                                                        [countryFlag] => Array
                                                                            (
                                                                                [countryCode] => AU
                                                                                [sourceURL] => http://img.shopping.com/sc/glb/flag/AU.gif
                                                                                [height] => 11
                                                                                [width] => 18
                                                                            )
    
                                                                        [id] => 427149
                                                                        [trusted] => 1
                                                                        [authorizedReseller] => 
                                                                    )
    
                                                                [cpc] => 0.76
                                                                [categoryId] => 1897
                                                                [sku] => WTH550
                                                                [mpn] => WTH550
                                                            )
    
                                                    )
    
                                                [1] => Array
                                                    (
                                                        [product] => Array
                                                            (
                                                                [name] => Simpson SWT554 Washing Machine
                                                                [fullDescription] => SWT554 Simpson Eziset Top Load 5.5kg Simpson Eziset Top Load Washing Machine 5.5kg Key Benefits Donât wait for a wash to finish All EZI Set models feature a time remaining display so you donât have to wait around for a wash to finish. You can better plan your day and get on with things youâd rather do. Soak in the tub With the Soak feature, you no longer have to fill the laundry tub or bucket full of soapy water to soak clothes.
                                                                [onSale] => 
                                                                [onSalePercentOff] => 0
                                                                [freeShipping] => 1
                                                                [images] => Array
                                                                    (
                                                                        [image] => Array
                                                                            (
                                                                                [0] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di3-2.shoppingshadow.com/pi/i.ebayimg.com/00/$T2eC16NHJG!FFm)BSeoSBSL!B(WBoQ~~_32-100x100-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=2&c=36&l=8084586&r=2&pr=2&pid=120196545&lks=142107&fks=142107&pdid=6F6pQ7Xs2Fq6A3HPubPXYQ%3D%3D
                                                                                        [height] => 100
                                                                                        [width] => 100
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [1] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di3-2.shoppingshadow.com/pi/i.ebayimg.com/00/$T2eC16NHJG!FFm)BSeoSBSL!B(WBoQ~~_32-200x200-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=2&c=36&l=8084586&r=2&pr=2&pid=120196545&lks=142107&fks=142107&pdid=6F6pQ7Xs2Fq6A3HPubPXYQ%3D%3D
                                                                                        [height] => 200
                                                                                        [width] => 200
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [2] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di3-2.shoppingshadow.com/pi/i.ebayimg.com/00/$T2eC16NHJG!FFm)BSeoSBSL!B(WBoQ~~_32-300x300-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=2&c=36&l=8084586&r=2&pr=2&pid=120196545&lks=142107&fks=142107&pdid=6F6pQ7Xs2Fq6A3HPubPXYQ%3D%3D
                                                                                        [height] => 300
                                                                                        [width] => 300
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [3] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di3-2.shoppingshadow.com/pi/i.ebayimg.com/00/$T2eC16NHJG!FFm)BSeoSBSL!B(WBoQ~~_32-400x400-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=2&c=36&l=8084586&r=2&pr=2&pid=120196545&lks=142107&fks=142107&pdid=6F6pQ7Xs2Fq6A3HPubPXYQ%3D%3D
                                                                                        [height] => 400
                                                                                        [width] => 400
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [4] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di3-2.shoppingshadow.com/pi/i.ebayimg.com/00/$T2eC16NHJG!FFm)BSeoSBSL!B(WBoQ~~_32-509x799-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=2&c=36&l=8084586&r=2&pr=2&pid=120196545&lks=142107&fks=142107&pdid=6F6pQ7Xs2Fq6A3HPubPXYQ%3D%3D
                                                                                        [height] => 799
                                                                                        [width] => 509
                                                                                        [available] => 1
                                                                                    )
    
                                                                            )
    
                                                                    )
    
                                                                [rating] => Array
                                                                    (
                                                                        [reviewCount] => 0
                                                                    )
    
                                                                [minPrice] => Array
                                                                    (
                                                                        [value] => 449.00
                                                                    )
    
                                                                [maxPrice] => Array
                                                                    (
                                                                        [value] => 579.00
                                                                    )
    
                                                                [productOffersURL] => http://www.au.shopping.com/simpson-swt554/prices~linkin_id-8084586
                                                                [productSpecsURL] => http://www.au.shopping.com/simpson-swt554/info~linkin_id-8084586
                                                                [offers] => Array
                                                                    (
                                                                        [matchedOfferCount] => 2
                                                                        [returnedOfferCount] => 0
                                                                        [pageNumber] => 1
                                                                    )
    
                                                                [numStores] => 2
                                                                [id] => 120196545
                                                            )
    
                                                    )
    
                                                [2] => Array
                                                    (
                                                        [offer] => Array
                                                            (
                                                                [id] => c2JUMh6N-NSFhASPgKrMCQ==
                                                                [used] => 
                                                                [featured] => 
                                                                [smartBuy] => 
                                                                [name] => 6.5kg Top Load LG Washing Machine WTH650
                                                                [description] => Best value is guaranteed when you buy the LG WM TL 6.5KG DD 4STAR 10YR WARNT from Appliances Online. Trusted by over 300,000 customers, Appliances Online is the largest online appliance retailer in Australia.
                                                                [manufacturer] => LG
                                                                [imageList] => Array
                                                                    (
                                                                        [image] => Array
                                                                            (
                                                                                [0] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di64.shoppingshadow.com/images/di/63/32/4a/554d68364e2d4e534668415350674b724d4351-100x100-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=3&pr=3&lks=142107&fks=142107
                                                                                        [height] => 100
                                                                                        [width] => 100
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [1] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di64.shoppingshadow.com/images/di/63/32/4a/554d68364e2d4e534668415350674b724d4351-200x200-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=3&pr=3&lks=142107&fks=142107
                                                                                        [height] => 200
                                                                                        [width] => 200
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [2] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di64.shoppingshadow.com/images/di/63/32/4a/554d68364e2d4e534668415350674b724d4351-300x300-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=3&pr=3&lks=142107&fks=142107
                                                                                        [height] => 300
                                                                                        [width] => 300
                                                                                        [available] => 1
                                                                                    )
    
                                                                                [3] => Array
                                                                                    (
                                                                                        [sourceURL] => http://img.shoppingshadow.com/sc/ds/no_image_100X100.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=3&pr=3&lks=142107&fks=142107
                                                                                        [height] => 400
                                                                                        [width] => 400
                                                                                        [available] => 
                                                                                    )
    
                                                                                [4] => Array
                                                                                    (
                                                                                        [sourceURL] => http://di64.shoppingshadow.com/images/di/63/32/4a/554d68364e2d4e534668415350674b724d4351-259x370-0-0.jpg?rqid=v3.46899dc104de95cd9ad5&rqt=SRS&a=1&c=36&l=8084586&r=3&pr=3&lks=142107&fks=142107
                                                                                        [height] => 370
                                                                                        [width] => 259
                                                                                        [available] => 1
                                                                                    )
    
                                                                            )
    
                                                                    )
    
                                                                [stockStatus] => in-stock
                                                                [basePrice] => Array
                                                                    (
                                                                        [value] => 599.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [tax] => Array
                                                                    (
                                                                        [value] => 0.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [shippingCost] => Array
                                                                    (
                                                                        [value] => 0.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [totalPrice] => Array
                                                                    (
                                                                        [value] => 599.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [originalPrice] => Array
                                                                    (
                                                                        [value] => 919.00
                                                                        [currency] => AUD
                                                                    )
    
                                                                [offerURL] => http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=130&BEFID=1897&aon=%5E1&MerchantID=427149&crawler_id=1905980&dealId=c2JUMh6N-NSFhASPgKrMCQ%3D%3D&url=http%3A%2F%2Fad.doubleclick.net%2Fclk%3B272924216%3B98885278%3Bd%3Fhttp%3A%2F%2Fwww.appliancesonline.com.au%2F65kg-top-load-lg-washing-machine-wth650%2F%3Futm_source%3Dshoppingcom%26utm_medium%3Dcse%26utm_campaign%3Dtop_load_washing_machines%26utm_content%3DWTH650&linkin_id=8084586&Issdt=140217064107&searchID=v3.46899dc104de95cd9ad5&DealName=6.5kg+Top+Load+LG+Washing+Machine+WTH650&dlprc=599.0&AR=3&NG=1&NDP=2&PN=1&ST=7&FPT=DSP&NDS=&NMS=&MRS=&PD=&brnId=14305&IsFtr=0&IsSmart=0&op=&CM=&RR=2&IsLps=0&code=&acode=217&category=&HasLink=&ND=&MN=&GR=&lnkId=&SKU=WTH650
                                                                [store] => Array
                                                                    (
                                                                        [name] => Appliances Online
                                                                        [logo] => Array
                                                                            (
                                                                                [sourceURL] => http://img.shopping.com/cctool/merch_logos/427149.gif
                                                                                [height] => 31
                                                                                [width] => 88
                                                                                [available] => 1
                                                                            )
    
                                                                        [phoneNumber] => 1300 000 500
                                                                        [ratingInfo] => Array
                                                                            (
                                                                                [reviewCount] => 81
                                                                                [rating] => 4.74
                                                                                [ratingImage] => Array
                                                                                    (
                                                                                        [sourceURL] => http://img.shopping.com/sc/mr/sdc_checks_45.gif
                                                                                        [height] => 18
                                                                                        [width] => 91
                                                                                    )
    
                                                                                [reviewURL] => http://www.au.shopping.com/xMR-store_appliances_online_4114784~MRD-427149~S-1~linkin_id-8084586
                                                                            )
    
                                                                        [countryFlag] => Array
                                                                            (
                                                                                [countryCode] => AU
                                                                                [sourceURL] => http://img.shopping.com/sc/glb/flag/AU.gif
                                                                                [height] => 11
                                                                                [width] => 18
                                                                            )
    
                                                                        [id] => 427149
                                                                        [trusted] => 1
                                                                        [authorizedReseller] => 
                                                                    )
    
                                                                [cpc] => 0.76
                                                                [categoryId] => 1897
                                                                [sku] => WTH650
                                                                [mpn] => WTH650
                                                            )
    
                                                    )
    
    

    Hey Ch0cu3r hope your keeping ok

     

    Im really stuck again with these arrays lol how do I drill down in this array,this might be simple to you but its very complex for me

     

    I have attached the data its extracted so far

     

    what I am looking to pull out is the

     

    description, manufacturer, the store name who sells it EG appliances online, image of the item and logo of the store etc, your intelligent enough so you will know what I mean.

     

     

     

    thanks in advance

    alan

  10. Hi David

     

    I am not so sure as someone else has been writing this for me but they can seem to get it right, if you type in iphone we get an iphone 3g 8GB but it does not take care of the space you mentioned. But sometimes when you type in C7 for a Nokia C7 it returns things like 02 which is baffling.  I think they are only searching on model_number. its a bit complex for me.......

     

    What I have done for clarity sake is included the two php files its using.  you can see what I mean on compareandchoose.com.au

    recyclers.php

    product_detail.php

  11. 
    Insurer, age min, age max, duration min, duration max, duration unit, single r1,duo r1,family r1,single r2,duo r2,family r2
    
    
    insurer1, 0,59, 1,5,days,$16.24,$32.48,$50.00,$17.60,$35.20,$57.00
    insurer2, 0,49, 1,2,months,$206.24,$302.48,$500.00,$170.60,$350.20,$570.00
    insurer1, 60,79, 22,29,days,$160.24,$320.48,$500.00,$170.60,$350.20,$563.00
    insurer2, 50,65, 1,5,days,$16.24,$32.48,$50.00,$17.60,$35.20,$57.00
    
    
    so something like
    
    select * from the database where the text boxes that the user has filled in match this criteria
    
    EG (worldiwide)WW=R1,(Pacific)PC=R2
    
    Single= single price
    Duo= duo price x 2 people
    Family, not sure if it is used
    
    days between for some insurers as they only use days
    but some insurers use days and months for instance between 2 and 3 months calculate the month field 05 for may 03 for march 05 - 03 = 2 months
    
    SO as you can see this can get quite complicated and I am only new to sql and php
    
    
    If anyone has experience or feels they can do this then let me know
    
    
    admin@compareandchoose.com.au
    
    

    Hi we are a comparison site and we are trying to calculate a formula to present to our users various prices for travel insurance, at that stage they will be able to click through to their chosen insurer.

     

     

    I have managed to code a bit of it but to be honest I am just lost.

     

    The format of some of the spreadsheets are something like the attached

     

     

    thanks

     

    you can see an example on compareandchoose.com.au

     

     

     

     

     

     

  12. <?php session_start();?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>compare</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
    <link href="css/hotelsGadget2013.css" rel="stylesheet" type="text/css" />
    <link href="css/product.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <section>
    
    <div class="ac_results" style="width: 680px !important;">
    
    <ul style="max-height: 405px; overflow: auto;">
    
    <?php
    include('config.php');
    if($_POST)
    {
    
    $q=$_POST['searchword'];
    
    /***************************************************************************************************************/
    /* image url = link to image...brand=Apple,model_number = iphone 3g 8gb but could be Iphone%%3gb 8GB, price=only show the highest price in ajax dropdown
    /* is this query correct as i know there are definately two rows in the database with values of
    /* http://fonebank.com/blablabla.jpg, Apple, Iphone%3G%8gb, $14.00
    /* http://mfyp.com/blablabla.jpg, Apple, iphone%%3G%8GB, $12.00
    /***************************************************************************************************************/
    
    $sql_res=mysql_query("select distinct image_url,brand,model_number,max(price) 
    from fonehub 
    where concat (brand, ' ',model_number) = upper(rtrim(ltrim('$q'))) 
    order by concat(brand,' ',model_number)"); 
    
    
    while($row=mysql_fetch_array($sql_res))
    {
    $info=$row['model_number'];
    $price=$row['price'];
    $img=$row['image_url'];
    
    
    $re_info='<b>'.$q.'</b>';
    
    
    $final_info = str_ireplace($q, $re_info, $info);
    
    ?>
    
    
    <li class="ac_even">
    <div class="hoverd">
    <span class="ref" style="display: none;">http://www.sellmymobile.com/phone/apple-iphone-5s-32gb/</span><a href="product_detail.php?product_name=<?php echo $info;?>" rel="nofollow"><img src="<?php echo $price;?>" height="50" width="53" class="phone"></a><div class="details"><h5>
    <a href="product_detail.php?product_name=
    <?php //$_SESSION['as']= $row['uid'];
    echo $info;?>" rel="nofollow">
    <?php echo $final_info; ?></a></h5></div><h5 class="price"><a href="" rel="nofollow"><span style="color: black;">Get up to</span> <?php echo "$" .$price; ?>0</a></h5></div></li>
    
    <?php
    }
    
    }
    else
    {
    
    }
    
    ?>
    </ul></div>
    </section>	
    </body>
    </html>
    
    

    Hi All

     

     

    I am trying to get a list of values from the database that are obviously unique when the user searches for a mobile phone.  I have two companies in there so I know that when a user types for instance for an Apple iphone the query should find this.

     

    The database was extracting some values initially but was running very very slow and would take about ten minutes too update, but now I am getting no results since I have had a play around with it

     

    the brand is Apple within the database

    the model_number could have 1 or two spaces at the end, beginning and could also be a mixture of upper and lower case letters hence the upper rtrim ltrim commands

     

    EG %iphone%%3g%8gb or iphone%3G%8GB

     

    Because someone initially wrote the code, please find this attached for clarify sake

     

     

    Thanks in advance all

  13. 
    
    /* Pass in the region from the webform */
    
    /* EG Region R1 so select query would be R1 */
    
    SELECT `Insurer` , `PolicyName`, `SingleR1`
    CASE {$numberofadults}
      WHEN 1 THEN "Single{R1}"
      WHEN 2 THEN "Single{R1}"
      WHEN 3 THEN "(Single{R1} x 3 x 0.95)"
      WHEN 4 THEN "(Single{R1} x 4 x 0.95)"
      WHEN 5 THEN "(Single{R1} x 5 x 0.95)"
      WHEN 6 THEN "(Single{R1} x 6 x 0.95)"
      WHEN 7 THEN "(Single{R1} x 7 x 0.95)"
      WHEN 8 THEN "(Single{R1} x 8 x 0.95)"
      WHEN 9 THEN "(Single{R1} x 9 x 0.95)"
      WHEN 10 THEN "(Single{R1} x 10 x 0.95)"
    END AS 'Price'
    FROM `travelinsurance`
    WHERE 43    /* Here we need to pass the ages from the form, Testing on only 1 traveller at age 43, what if 5 travellers and one is age 70 */
    BETWEEN `AgeMin`
    AND `AgeMax`
    AND `DurationUnit` = 'Days'
    AND 2 BETWEEN `DurationDaysMin` AND `DurationDaysMax` 
    ORDER BY `Insurer`
    

    Hi Professionals I have an update I still cannot figure out the formula or if it is even possible, apparently I do not need the DuoR1 column it will only query the SingleR1 column or SingleR2 and so on so this is what I have back from the insurance people

     

    So lets say that a 40 year old traveler is $60 and a 70 year old traveller is $70 as once the age is over 59 the policy price goes up

     

    if there are more than 2 travelers then it is automatically a 5% discount

     

    So if there were 3 x 40 year olds and 2 x 70 year olds it would be

     

    (3 x $60 + 2 x $70) x 0.95 for the 5% discount

     

    what would be the best possible approach to this

     

    Im not sure if this mathematical formula is possible but if it is then thanks in advance

     

     

  14. "SELECT `Insurer` , `Policy Name`, `SingleR1` AS 'Price'
    from table"
    
    or
    
    "SELECT `Insurer` , `Policy Name`, `DuoR1` + `SingleR1` AS 'Price'
    from table"
    
    this needs to change and add two columns together the DuoR1 and SingleR1 because it is now a 3 person policy.
    
    "SELECT `Insurer` , `Policy Name`, `DuoR1` + `SingleR1` AS 'Price'
    from table"
    
    the policy is (DuoR1 + SingleR1)
    

    Hi physco

     

    That gets them echoed out fine, but rather than the table initially querying 1 column it now needs to query two columns in the db and add them together.  EG 3 person policy so now needs to add two columns,  I hope I am making sense


  15. switch ($destinationCode)
    {
    case 'WW':
    $region = 'R1';
    break;
    case 'EU':
    $region = 'R2';
    break;
    case 'AS':
    $region = 'R3';
    break;
    case 'PC':
    $region = 'R4';
    break;
    case 'AU':
    $region = 'R5';
    break;
    }

    switch ($numberofadults)
    {
    case 1:
    $policyandregion = 'Single' .$region;
    break;
    case 2:
    $policyandregion = 'Duo' .$region;
    break;
    case 3:
    $policyandregion = 'Duo' .$region + 'Single' .$region;
    break;
    }

    $rew=mysql_query("SELECT `Insurer` , `omedassistance`,`excess`,`Policy Name`, `$policyandregion` AS 'Price'
    FROM `travelinsurance`
    WHERE 43
    BETWEEN `Age Min`
    AND `Age Max`
    AND `Duration Unit` = 'Days'
    AND $num_of_days BETWEEN `DurationDaysMin` AND `DurationDaysMax`
    ORDER BY `Insurer`")




    MYSQL QUERY NEEDS TO BE

    SELECT `Insurer` , `omedassistance` , `excess` , `Policy Name` , `SingleR1` + `DuoR1` AS 'Price'
    FROM `travelinsurance`
    WHERE 43
    BETWEEN `Age Min`
    AND `Age Max`
    AND `Duration Unit` = 'Days'
    AND 2
    BETWEEN `DurationDaysMin`
  16. Hi all

     

    I have some code that I cannot figure out

     

    Basically I have a variable that adds a regionid to a policytype

     

    what happens is

     

    if it is Region1(R1) I add this to a policytype eg single or duo so it would be SingleR1 or DuoR1 or SingleR2 etc which works fine

     

    the problem is when it is more than 2 people...So if it is 3 people it would be DuoR1 + SingleR1 so I am trying to merge the columns in sql but cannot figure out how to do this or if it is even possible

     

    so my query would be select 'DuoR1' + 'SingleR1' from table. this policy type would go up to a maximum of ten people

     

    so I would get 'DuoR1' + 'DuoR1' for 4 people, 'DuoR1' + 'DuoR1' + 'SingleR1' for 5 people and so on.

     

    I have attached my code to make this clearer

     

    and thanks in advance

    policyandregion.txt

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.