Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    1

    Custom Work for Mod that Does Not Work Anymore after Upgrading to New Version

    I have a modification that was done Pre Version 4.2.2 and now that I upgraded to the newest version, it does not work correctly anymore. I am assuming it is a simple fix, but I cannot figure this out.

    The Modification takes ALL the products in every category and displays them in alphabetical order on a separate page. Since I upgraded, it will ONLY show items if they are listed in two categories. This may be a hint at what needs to be fixed.

    Here is a link to the modification. As you will see, it only displays a few products when it should be displaying hundreds of products.
    http://www.empirecoins.net/shop/inde...page=0&price=1

    Can anyone give me a hand on this? Here is the code in my global.php file:
    Code:
    // ###################### pricelist ###############
    
    function pricelist () {
    
    	global $DB_site, $dbprefix;
    
    
    
    	$temps=$DB_site->query("SELECT * FROM ".$dbprefix."categories where subof='0' ORDER BY dorder ASC limit $_GET[page], 5");
    
    	while($cat=$DB_site->fetch_assoc($temps)) {
    
    	#echo "<B>$cat[dorder]</B><BR>";
    
    		
    
    	if ($_GET[price] != "" && !empty($_GET[price])){$price_b = "AND ".$dbprefix."products.price>='$_GET[price]'";}
    
    	else{$price_b = "";}
    
    
    
    		//categories
    
    		$temps2=$DB_site->query("SELECT ".$dbprefix."products_categories.*, ".$dbprefix."products.price FROM ".$dbprefix."products_categories, ".$dbprefix."products WHERE ".$dbprefix."products.id=".$dbprefix."products_categories.productid AND ".$dbprefix."products_categories.catid='$cat[id]' $price_b ORDER BY ".$dbprefix."products.title ASC");
    
    		while($prod_id=$DB_site->fetch_assoc($temps2)) {
    
    
    
    			$temps3=$DB_site->query("SELECT * FROM ".$dbprefix."products where id='$prod_id[productid]' ");
    
    			$prod_info=$DB_site->fetch_assoc($temps3);
    
    
    
    		$item_list .= template('pricelist_products.html', array('sku' => $prod_info[id], 'title' => $prod_info[title], 'price' => $prod_info[price], 'in_stock' => $prod_info[in_stock], 'desc' => $prod_info[short_desc]));
    
    		}
    
    
    
    	$category_list .= template('pricelist_categories.html', array('catid' => $cat[id], 'cat_title' => $cat[title], 'item_list' => $item_list));
    
    	$category_dropdown .= '<option value="#'.$cat[id].'">'.$cat[title];

    Here is the small snippet of code in my index.php file:
    Code:
    case 'pricelist':
    $index[main_content] 	 = pricelist();
    break;
    Last edited by TWT-Chris; 09-14-2010 at 11:31 AM.

  2. #2
    Join Date
    Sep 2005
    Posts
    176
    I can fix that for you - contact me from my website below if you want me to have a look.

    -Jim
    Jim Roberts
    Roberts WebForge, Inc.
    www.robertswebforge.com

Similar Threads

  1. Sunshop Website integration -custom work
    By Unregistered in forum Customizations, Mods & Plugins
    Replies: 11
    Last Post: 06-26-2014, 03:23 AM
  2. Need some work done for $ Sun shop custom stuff
    By sweetquads in forum Customizations, Mods & Plugins
    Replies: 3
    Last Post: 03-20-2010, 12:57 AM
  3. Is there a way to get custom work and mods?
    By trigger571 in forum Customizations, Mods & Plugins
    Replies: 4
    Last Post: 04-25-2008, 11:51 PM
  4. Custom Work Required
    By trigger571 in forum Customizations, Mods & Plugins
    Replies: 0
    Last Post: 01-15-2008, 07:12 AM
  5. Sunshop Website integration -custom work
    By Unregistered in forum General Discussion
    Replies: 0
    Last Post: 11-23-2005, 06:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •