prefix ."posts as i LEFT JOIN " . $wpdb->prefix . "postmeta as pm_active on i.ID = pm_active.post_ID and pm_active.meta_key = '_item_active' LEFT JOIN " . $wpdb->prefix . "postmeta as pm_start_date on i.ID = pm_start_date.post_ID and pm_start_date.meta_key = '_item_start_date' LEFT JOIN " . $wpdb->prefix . "postmeta as pm_end_date on i.ID = pm_end_date.post_ID and pm_end_date.meta_key = '_item_end_date' LEFT JOIN " . $wpdb->prefix . "postmeta as pm_code on i.ID = pm_code.post_ID and pm_code.meta_key = '_code' WHERE i.post_type = '" . FOXYPRESS_CUSTOM_POST_TYPE . "' AND i.post_status = 'publish' AND pm_active.meta_value = '1' AND (coalesce(pm_start_date.meta_value, now()) <= now() AND coalesce(pm_end_date.meta_value, now()) >= now()) AND ( pm_code.meta_value = '" . mysql_escape_string($searchterm) . "' or i.post_title = '" . mysql_escape_string($searchterm) . "' or i.post_content = '" . mysql_escape_string($searchterm) . "' ) UNION SELECT i.* FROM " . $wpdb->prefix ."posts as i LEFT JOIN " . $wpdb->prefix . "postmeta as pm_active on i.ID = pm_active.post_ID and pm_active.meta_key = '_item_active' LEFT JOIN " . $wpdb->prefix . "postmeta as pm_start_date on i.ID = pm_start_date.post_ID and pm_start_date.meta_key = '_item_start_date' LEFT JOIN " . $wpdb->prefix . "postmeta as pm_end_date on i.ID = pm_end_date.post_ID and pm_end_date.meta_key = '_item_end_date' LEFT JOIN " . $wpdb->prefix . "postmeta as pm_code on i.ID = pm_code.post_ID and pm_code.meta_key = '_code' WHERE i.post_type = '" . FOXYPRESS_CUSTOM_POST_TYPE . "' AND i.post_status = 'publish' AND pm_active.meta_value = '1' AND (coalesce(pm_start_date.meta_value, now()) <= now() AND coalesce(pm_end_date.meta_value, now()) >= now()) AND ( pm_code.meta_value LIKE '%" . mysql_escape_string($searchterm) . "%' or i.post_title LIKE '%" . mysql_escape_string($searchterm) . "%' or i.post_content LIKE '%" . mysql_escape_string($searchterm) . "%' )"; $searchitems = $wpdb->get_results($searchSQL); $ShowSearchResults = true; } ?> FoxyPress Plugin

Please visit our forum for info and help for all your needs.
http://www.foxy-press.com/forum

Show Items From:
Show Add To Cart:
Items Per Page:
Items Per Row:
Show More Detail Link:
 



Search Results
Add Item From Inventory
ID) ? get_post_thumbnail_id($item->ID) : 0); $imageNumber = 0; $src = ""; $attachments = get_posts(array('numberposts' => -1, 'post_type' => 'attachment','post_status' => null,'post_parent' => $item->ID, 'order' => 'ASC','orderby' => 'menu_order')); foreach ($attachments as $attachment) { $thumbnailSRC = wp_get_attachment_image_src($attachment->ID, "thumbnail"); if ($featuredImageID == $attachment->ID || ($featuredImageID == 0 && $imageNumber == 0)) $src = $thumbnailSRC[0]; $imageNumber++; } if (!$src) $src = INVENTORY_IMAGE_DIR . "/" . INVENTORY_DEFAULT_IMAGE; $price = foxypress_GetActualPrice(get_post_meta($item->ID, "_price", true), get_post_meta($item->ID, "_saleprice", true), get_post_meta($item->ID, "_salestartdate", true), get_post_meta($item->ID, "_saleenddate", true)); ?>
Full Inventory List
Search Inventory:



get_row("SELECT count(i.ID) as RowCount FROM " . $wpdb->prefix ."posts as i WHERE i.post_type='" . FOXYPRESS_CUSTOM_POST_TYPE . "' AND i.post_status='publish' ORDER BY i.ID DESC"); $pageNumber = foxypress_FixGetVar('fp_pn'); $start = ($pageNumber != "" && $pageNumber != "0") ? $start = ($pageNumber - 1) * $limit : 0; $items = $wpdb->get_results("SELECT i.* FROM " . $wpdb->prefix ."posts as i WHERE i.post_type='" . FOXYPRESS_CUSTOM_POST_TYPE . "' AND i.post_status='publish' ORDER BY i.ID DESC LIMIT $start, $limit"); ?>
Add Item From Inventory
ID) ? get_post_thumbnail_id($item->ID) : 0); $imageNumber = 0; $src = ""; $attachments = get_posts(array('numberposts' => -1, 'post_type' => 'attachment','post_status' => null,'post_parent' => $item->ID, 'order' => 'ASC','orderby' => 'menu_order')); foreach ($attachments as $attachment) { $thumbnailSRC = wp_get_attachment_image_src($attachment->ID, "thumbnail"); if ($featuredImageID == $attachment->ID || ($featuredImageID == 0 && $imageNumber == 0)) $src = $thumbnailSRC[0]; $imageNumber++; } if (!$src) $src = INVENTORY_IMAGE_DIR . "/" . INVENTORY_DEFAULT_IMAGE; $price = foxypress_GetActualPrice(get_post_meta($item->ID, "_price", true), get_post_meta($item->ID, "_saleprice", true), get_post_meta($item->ID, "_salestartdate", true), get_post_meta($item->ID, "_saleenddate", true)); ?>
RowCount > $limit) { $Pagination = foxypress_GetPagination($pageNumber, $drRows->RowCount, $limit, $targetpage, 'fp_pn'); echo ("
" . $Pagination); } ?>