germ Posted September 6, 2008 Posted September 6, 2008 MAKE A BACKUP BEFORE MAKING ANY EDITS. At the top of your /catalog/index.php find this code: // the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) { Change it to something like this: // the following cPath references come from application_top.php $category_depth = 'top'; // // beginning of added code: // if ( ! isset($cPath) || ($cPath=='') ) { $cPath_array[0] = 21; $cPath = 21; $current_category_id = 21; } // // end of added code // if (isset($cPath) && tep_not_null($cPath)) { I used the number 21 as an example. You'd need to replace that number with the number of the category it is that you wish to open. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted September 6, 2008 Author Posted September 6, 2008 Here is a link to a thread where someone who tried this had a little problem with it when selecting a particular manufacturer: Click Me If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted October 6, 2009 Posted October 6, 2009 <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b>MAKE A BACKUP BEFORE MAKING ANY EDITS.</b><!--colorc--></span><!--/colorc--> At the top of your <b>/catalog/<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->index.php<!--colorc--></span><!--/colorc--></b> find this code: <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// the following cPath references come from application_top.php $category_depth = 'top'; if (isset($cPath) && tep_not_null($cPath)) {<!--c2--></div><!--ec2--> Change it to something like this: <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// the following cPath references come from application_top.php $category_depth = 'top'; // // beginning of added code: // if ( ! isset($cPath) || ($cPath=='') ) { $cPath_array[0] = 21; $cPath = 21; $current_category_id = 21; } // // end of added code // if (isset($cPath) && tep_not_null($cPath)) {<!--c2--></div><!--ec2--> I used the number 21 as an example. You'd need to replace that number with the number of the category it is that you wish to open. This is exactly what I want but why does it remove my TEXT_MAIN?
germ Posted October 25, 2009 Author Posted October 25, 2009 This is exactly what I want but why does it remove my TEXT_MAIN? Because you end up in a different part of the code where TEXT_MAIN doesn't get displayed. Sorry I didn't reply sooner. You only get email reply notifications to a thread for thirty days. I hadn't posted in this in over a year. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 26, 2009 Posted October 26, 2009 Germ do you know how to re-name the index.php file to let say for example shop.php without messing up the other functions on index.php.
germ Posted October 26, 2009 Author Posted October 26, 2009 Germ do you know how to re-name the index.php file to let say for example shop.php without messing up the other functions on index.php. I think all you would need to do is change this in /includes/filenames.php define('FILENAME_DEFAULT', 'index.php'); To match the new file name If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 26, 2009 Posted October 26, 2009 thanks Germs I will give this a try and let you know much appreciated for the help
germ Posted October 26, 2009 Author Posted October 26, 2009 thanks Germs I will give this a try and let you know much appreciated for the help You do realize that if you rename the existing index file you'll need to replace it with another "placeholder" (index.php, index.htm, or index.html) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 26, 2009 Posted October 26, 2009 nope seem to have got an error saying the following; Warning: require(includes/languages/english/shop.php) [function.require]: failed to open stream: No such file or directory in /home/fhlinux190/i/inbreathe.co.uk/user/htdocs/catalog/index.php on line 33 Warning: require(includes/languages/english/shop.php) [function.require]: failed to open stream: No such file or directory in /home/fhlinux190/i/inbreathe.co.uk/user/htdocs/catalog/index.php on line 33 Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/shop.php' (include_path='.:/usr/share/pear/') in /home/fhlinux190/i/inbreathe.co.uk/user/htdocs/catalog/index.php on line 33 Any other ideas? please
germ Posted October 26, 2009 Author Posted October 26, 2009 nope seem to have got an error saying the following; Any other ideas? please My bad! You have to rename the index.php in /includes/languages/english folder to the same name, too. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 26, 2009 Posted October 26, 2009 strange I seem to be getting a white screen lol check it out http://www.inbreathe.co.uk/catalog/shop.php
germ Posted October 26, 2009 Author Posted October 26, 2009 If all you did was rename the files it should work. It acts like the /catalog/shop.php doesn't exist. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 26, 2009 Posted October 26, 2009 yh mmm what should I do? you think I should change it back to index.php? or is there any work around for this.
♥kymation Posted October 26, 2009 Posted October 26, 2009 You probably got one of those files in the wrong place. catalog/shop.php and catalog/includes/languages/english/shop.php are not interchangeable. Regards Jim See my profile for a list of my addons and ways to get support.
germ Posted October 26, 2009 Author Posted October 26, 2009 I kind of did what you're trying to do (I think). The guy who owns the site I manage didn't want the categories on the "landing page". So I crerated a different index.php as a new landing page. But what I did was create a new entry in filenames.php called FILENAME_CATALOG and changed other places in the code to reference it instead. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted October 26, 2009 Author Posted October 26, 2009 Don't get me wrong. I'm not trying to say the way you're going about it is wrong. I'm just saying how I did it at the time. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 26, 2009 Posted October 26, 2009 what would be the step by step guide for this?
shows103 Posted October 26, 2009 Posted October 26, 2009 lol its 3:08 am lol I live the UK I'm half asleep lol, but still doing this
germ Posted October 26, 2009 Author Posted October 26, 2009 Well it's time for me to get some shut-eye as well. Let me look over the code and I'll see if I can get something together and post it tomorrow evening, If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 26, 2009 Posted October 26, 2009 cheers thanks much appreciated, I think I'm gonna get some shut eye too and be fresh for 2moro
shows103 Posted October 26, 2009 Posted October 26, 2009 I feel so excited hopefully get this done 2day
germ Posted October 26, 2009 Author Posted October 26, 2009 I renamed the index and made an entry in /includes/filenames.php to the new name: define('FILENAME_CATALOG', 'indexnew.php'); Then I only had to change three other files. /includes/application_top.php (Two nonconsecutive lines) $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_CATALOG)); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_CATALOG, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); /includes/modules/categories.php $categories_string .= tep_href_link(FILENAME_CATALOG, $cPath_new) . '">'; /login.php if(MODULE_PAYMENT_PAYPAL_EC_STATUS == 'True' || MODULE_PAYMENT_PAYPAL_WPP_STATUS == 'True') { tep_redirect(tep_href_link(FILENAME_CATALOG)); } else { tep_redirect(tep_href_link(FILENAME_DEFAULT));} If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
shows103 Posted October 27, 2009 Posted October 27, 2009 OK I'll have try this see if this works for me lol I hope it does lol
Recommended Posts
Archived
This topic is now archived and is closed to further replies.