Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Modular Front Page


kymation

Recommended Posts

The size of the box is constrained by the design of the osCommerce admin. That will probably never be fixed.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

AAAAAAAAGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.

 

Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhh..........................

 

I feel better now!

 

Found what was causing my issues, and now need to know if a solution exists.

 

This happened by accident, by the way.

 

http://www.domain.com/catalog/

 

IS NOT THE SAME AS

 

http://www.domain.com/catalog/index.php

 

!!!!!!!!!!

 

The banner rotator and scroller module DO NOT LOAD on the page

 

http://www.domain.com/catalog/

 

But if we load

 

http://www.domain.com/catalog/index.php

 

Everything is fine, so how do we fix this (will try to work this out myself!)

 

-- EDIT --

 

OK, I tried to put an OR statement after

 

$PHP_SELF == 'index.php'

 

like this

 

$PHP_SELF == 'index.php' || $PHP_SELF == '/'

 

But it didnt work, lol

 

I think I will just wait for Kymation to help with this!

 

Has any progress been made for this issue? I am having the same problem. The Modular Front page only displays if the site is accessed by index.php. I really want to use this contribution, but it concerns me that people visiting my site by just typing in "www.mysite.com" won't be able to see my beautiful homepage, except what's in the header and footer.

 

If I knew more about v2.3.1, I might know where to start looking to solve the problem. I've been working with osC for years, and had gotten pretty good with installing addons and creating custom templates with STS, but figuring things out for v2.3.1 is like learning to ride a bike all over again!

 

Assistance is much appreciated.

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

I haven't been able to reproduce this. My test site and the live sites I've tried it on all just work. Then again, you should never have two URLs to your front page, as this will earn you the dreaded duplicate penalty from Google et al. So, maybe redirect / to /index.php.

 

That's all I can come up with.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

OK, I may be getting somewhere.

 

I've modified this code in index.php:

<?php 

if ($oscTemplate->hasBlocks('front_page')) {
echo $oscTemplate->getBlocks('front_page'); 
} else {
echo $oscTemplate->getBlocks('boxes_column_left');
}
?>

 

With this code added, the left column's boxes display where the front page content should display when the site is called as "www.mysite.com/". The front page blocks display when the site is called as "www.mysite.com/index.php".

 

Any ideas? I can PM you links to my development site if it will help.

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

Yes, that would replace the left column modules with the front page modules. I have no idea why you would want to do that.

 

The problem that you are having is due to the page restriction code in the modules. The modules are designed to run on the front page only, as running them on other pages does no good and increases overhead. You can change that behavior by finding this line in each module:

 

      if( $PHP_SELF == 'index.php' && $cPath == '' ) {

and changing it to

 

      if( true ) {

Note that this code doesn't occur in all of the modules, just the ones that were giving problems when they were run on other pages.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks Jim for the super-fast reply!

 

I only told it to display the left-column blocks because I needed something to display if the condition was false, and I knew the left column blocks worked with "www.mysite.com/". You could put in a simple text string and the behavior is the same.

 

I did do a test to see if any particular block could be causing the problem. I installed all of the front page modules and then disabled them one by one, reloading the page(s) in between. The behavior persisted no matter which blocks were enabled/disabled. I'll keep looking and testing and post any results back here.

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

Now this is getting weird. There's no reason, other than the code that I posted, for these modules to not work anywhere. I've used one in the footer of a site, and others have reported using them in the header, meaning that they show up on every page.

 

I'm out of ideas.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

OK. I've gotten a little further maybe?

 

I commented this out of all of the module pages:

 

if ($PHP_SELF == 'index.php' && $cPath == '') {

 

To index.php, I changed to this:

<?php 

if ((basename($PHP_SELF) == FILENAME_DEFAULT) || ($category_depth == 'top') || (!isset($_GET['manufacturers_id'])) || $cPath == '') {
  echo $oscTemplate->getBlocks('front_page'); 
} else {
echo $oscTemplate->getBlocks('boxes_column_left');
}
?>

 

The front page blocks are now showing. I think it must have something to do with using or operators instead of and operators. I tried the same statement above with the &&'s but it didn't work either.

 

The only question now is while this seems to be working on the home page, will it have any adverse effects on any other pages?

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

If I've gotten my head around the problem correctly, the problem arises when the condition "this page = index.php" is true. When the site is called without index.php, as in just "www.mysite.com/" the statement = false. We need to be able to determine that this is the front page without saying it is index.php. Once that's determined, then we narrow it down to the state where we haven't accessed any category levels yet. Did that make any sense?

 

In my code above, one of the statements must do the trick. We really don't need the else bit. I just left it in for testing.

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

I've made another discovery which indicates the issue may not be isolated just to this contribution.

 

I used this code in my header to hide the breadcrumb on the front page:

 

<?php  if ($PHP_SELF == 'index.php' && $cPath == '') {
echo '';
} else {?>
<div class="grid_24 ui-widget infoBoxContainer">
 <div class="ui-widget-header infoBoxHeading"><?php echo '  ' . $breadcrumb->trail(' » '); ?></div>
</div>
<?php
}
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>

 

Sure enough, we get the same behavior. When the site is accessed using index.php, the breadcrumb disappears. When called with "www.mysite.com/" the breadcrumb remains.

 

I don't know if any of this is helping or not, but maybe it will trigger something for someone with more knowledge than me. I realize I know only just enough to be dangerous! LOL

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

I still can't duplicate this, so it could be something peculiar to your server or your modifications to osCommerce. You might try something like this:

 

 if ( isset($category_depth) && $category_depth == 'top' ) {

Since $category_depth is only used on the front page and category pages, and is set to 'top' only on the front page, this should work as a restriction that does not depend on recognizing the filename.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thank you for your effort, Jim. The code above seems to be working. If I come across anything else, I'll post it here.

Happiness does not come from doing easy work but from the afterglow of satisfaction that comes after the achievement of a difficult task that demanded our best. --Anonymous

Link to comment
Share on other sites

  • 2 weeks later...

Is there a piece of code adjustment to persuade the text to display centered left to right inside the individual category boxes?

 

Module installed perfectly.... worked fabuously!

 

 

Thanks,

 

Timmy C

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

First i'll like to thank you for this wonderful contribution.

 

Here's my problem....

 

I've installed all the files and replaced the index.php files into my site, but when i login to Admin, i am unable to see the Front page under Modules.

 

Appreciate if you could advise my problem.

 

Thanks in advance.

Edited by ichiyen
Link to comment
Share on other sites

The most likely cause is that you have not uploaded one or more of the files in the admin section. Check your files, or just upload all of them again.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

The most likely cause is that you have not uploaded one or more of the files in the admin section. Check your files, or just upload all of them again.

 

Regards

Jim

 

 

You are correct...

 

i forgotten that i have changed my admin folder name...

 

Thanks a million...

 

Great addon!

Link to comment
Share on other sites

Hello everyone, I installed this add on some hours ago, but then I wanted to go back to my original installation. I deleted all the files and place the old ones, but when I try to enter my store some messages appear... Can someone help me recover my original store? I am a newbie on all this things...

 

Warning: oscTemplate::include(includes/languages/espanol/modules/front_page/categories_images.php) [osctemplate.include]: failed to open stream: No such file or directory in /www/aviationstuff.com.ar/htdocs/shop/includes/classes/osc_template.php on line 86

 

Warning: oscTemplate::include() [function.include]: Failed opening 'includes/languages/espanol/modules/front_page/categories_images.php' for inclusion (include_path='./:/usr/local/php5/lib/php') in /www/aviationstuff.com.ar/htdocs/shop/includes/classes/osc_template.php on line 86

 

Warning: oscTemplate::include(includes/modules/front_page/categories_images.php) [osctemplate.include]: failed to open stream: No such file or directory in /www/aviationstuff.com.ar/htdocs/shop/includes/classes/osc_template.php on line 87

 

Warning: oscTemplate::include() [function.include]: Failed opening 'includes/modules/front_page/categories_images.php' for inclusion (include_path='./:/usr/local/php5/lib/php') in /www/aviationstuff.com.ar/htdocs/shop/includes/classes/osc_template.php on line 87

 

Fatal error: Class 'categories_images' not found in /www/aviationstuff.com.ar/htdocs/shop/includes/classes/osc_template.php on line 90

 

The same from www.aviationstuff.com.ar

 

THANKS IN ADVANCE!

Link to comment
Share on other sites

You can delete your entire site and reinstall osCommerce. That's the hard way to do it, but it will work. Note that "delete the entire site" means deleting the database as well.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Yes, if you reinstall you lose everything. As I said before, this is the hard way to do it.

 

If you don't want to do everything the hard way, then just uninstall the modules first, then delete the module files.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 3 weeks later...

Please assist keep getting the following errors when I try to add modules

 

Warning: include_once(includes/functions/modules/front_page/featured.php) [function.include-once]: failed to open stream: No such file or directory in /home/execgift/public_html/includes/modules/front_page/featured.php on line 39

 

Warning: include_once() [function.include]: Failed opening 'includes/functions/modules/front_page/featured.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/execgift/public_html/includes/modules/front_page/featured.php on line 39

 

Warning: include_once(includes/functions/modules/front_page/featured.php) [function.include-once]: failed to open stream: No such file or directory in /home/execgift/public_html/includes/modules/front_page/scroller.php on line 38

 

Warning: include_once() [function.include]: Failed opening 'includes/functions/modules/front_page/featured.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/execgift/public_html/includes/modules/front_page/scroller.php on line 38

 

and when I try to Add Scroller module I get this:Warning: include_once(includes/functions/modules/front_page/featured.php) [function.include-once]: failed to open stream: No such file or directory in /home/execgift/public_html/includes/modules/front_page/scroller.php on line 38

 

Warning: include_once() [function.include]: Failed opening 'includes/functions/modules/front_page/featured.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/execgift/public_html/includes/modules/front_page/scroller.php on line 38

 

Warning: Cannot modify header information - headers already sent by (output started at /home/execgift/public_html/includes/modules/front_page/scroller.php:38) in /home/execgift/public_html/admin/includes/functions/general.php on line 34

 

and then when I try to edit I get this: Fatal error: Call to undefined function tep_cfg_pull_down_products() in /home/execgift/public_html/admin/modules.php(232) : eval()'d code on line 1

 

Warning: include_once(includes/functions/modules/front_page/featured.php) [function.include-once]: failed to open stream: No such file or directory in /home/execgift/public_html/includes/modules/front_page/scroller.php on line 38

 

Warning: include_once() [function.include]: Failed opening 'includes/functions/modules/front_page/featured.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/execgift/public_html/includes/modules/front_page/scroller.php on line 38

 

 

I am dying to use this feature on my website please assist

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...