diff --git a/Pickles.php b/Pickles.php index 1d63a39..8d58c33 100755 --- a/Pickles.php +++ b/Pickles.php @@ -1,16 +1,18 @@ file) || filemtime($this->file) > $this->timestamp) { - // @todo no hardcoded paths! - $file = '/var/www/josh/pickles/config/' . $site . '.xml'; + $file = PICKLES_PATH . 'config/' . $site . '.xml'; if (file_exists($file)) { $this->file = $file; diff --git a/classes/Viewer/Smarty.php b/classes/Viewer/Smarty.php index baaecf9..fdd169b 100644 --- a/classes/Viewer/Smarty.php +++ b/classes/Viewer/Smarty.php @@ -24,9 +24,8 @@ class Viewer_Smarty extends Viewer_Common { $smarty->template_dir = '../templates/'; // @todo instead of having this in /tmp (which is Linux-scentric) perhaps move it to a folder in the common dir - $temp_path = "/tmp/smarty/{$_SERVER['SERVER_NAME']}/"; - $cache_dir = $temp_path . 'cache'; - $compile_dir = $temp_path . 'compile'; + $cache_dir = TEMP_PATH . 'cache'; + $compile_dir = TEMP_PATH . 'compile'; if (!file_exists($cache_dir)) { mkdir($cache_dir, 0777, true); } if (!file_exists($compile_dir)) { mkdir($compile_dir, 0777, true); } @@ -38,7 +37,7 @@ class Viewer_Smarty extends Viewer_Common { // Include custom Smarty functions // @todo Stupid fucking hard coded path - $directory = PATH . '../../pickles/smarty/functions/'; + $directory = PICKLES_PATH . 'smarty/functions/'; if (is_dir($directory)) { if ($handle = opendir($directory)) { diff --git a/config/menopausesolutions.net.xml b/config/menopausesolutions.net.xml new file mode 100755 index 0000000..803991e --- /dev/null +++ b/config/menopausesolutions.net.xml @@ -0,0 +1,22 @@ + + + localhost + ribbonnutritio + XrP5DZbZ + ribbonnutrition_com_-_storelocator + + + home + + Home + Products and Formula + Retail Locator and Contact + + + + MenoSol + + joshsherman@gmail.com + + + diff --git a/models/store.php b/models/store.php index 1e401df..8d0b32f 100644 --- a/models/store.php +++ b/models/store.php @@ -10,10 +10,16 @@ class store extends Model { $this->data['subnav'] = $config->get('store', 'sections'); // Loads the categories - $categories = $this->db->getArray('SELECT id, name FROM categories WHERE parent_id IS NULL AND visible = "Y" ORDER BY weight;'); + $categories = $this->db->getArray('SELECT id, name, permalink FROM categories WHERE parent_id IS NULL AND visible = "Y" ORDER BY weight;'); if (is_array($categories)) { foreach ($categories as $key => $category) { - $categories[$key]['subcategories'] = $this->db->getArray('SELECT id, name FROM categories WHERE parent_id = "' . $category['id'] . '" AND visible = "Y" ORDER BY weight;'); + $categories[$key]['subcategories'] = $this->db->getArray(' + SELECT id, name, permalink + FROM categories + WHERE parent_id = "' . $category['id'] . '" + AND visible = "Y" + ORDER BY weight; + '); } } diff --git a/templates/store/categories.tpl b/templates/store/categories.tpl index 6011e1c..19deccf 100644 --- a/templates/store/categories.tpl +++ b/templates/store/categories.tpl @@ -1,11 +1,12 @@
- {foreach from=$categories item=category} -
-

{$category.name}

+ {foreach from=$categories item=parent_category} +
+

{$parent_category.name}


{/foreach} diff --git a/templates/store/navigation.tpl b/templates/store/navigation.tpl index 3f580f0..251794a 100644 --- a/templates/store/navigation.tpl +++ b/templates/store/navigation.tpl @@ -1,7 +1,7 @@