View Single Post
  #2  
Old 09-29-2011, 05:22 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Adding products to a static page

Sure this could be accomplished easily. First you need to have "Parse Smarty tags in the content of embedded static pages" checked under General Settings.

Put the products you want to display in Featured Products for a certain category.

Then in your static page:
Code:
{include file="customer/main/products.tpl" products=$f_products}

Then in pages.php:
Code:
// Change X to your pageid # and Y to the id of the category you want to display for that page if ($pageid == 'X') { $cat = Y; include './featured_products.php'; }
After...
Code:
if ($page_data) { $filename = $pages_dir.$page_data["filename"]; $page_content = func_file_get($filename, true); if ($page_content === false) { $page_content = func_get_langvar_by_name("lbl_page_not_found", array(), false, true); }
And before...
Code:
$smarty->assign("page_data", $page_data); $smarty->assign("page_content", $page_content); $location[] = array($page_data["title"], "");

I got this code a long time ago, not certain that it applies to your version. But it should point you in the right direction at least. I believe the original code was posted by Jon, but I can't find the thread.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote