Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Modular Front Page


kymation

Recommended Posts

// Set the Javascript to go in the header

$header = '<link rel="stylesheet" type="text/css" href="ext/modules/front_page/banner_rotator/stylesheet.css" />' . PHP_EOL;

$header .= '<script type="text/javascript" src="ext/modules/front_page/banner_rotator/bannerRotator.js"></script>' . PHP_EOL;

 

Where the hell is the bannerRotator.js?

 

I think that without that nothing works. But this is normal here the the famous oS Cmmerce. I used this since almost 5 years and in the meantime I got gray hair over this!

Link to comment
Share on other sites

  • 2 weeks later...

I am not sure if anyone else has run in to this problem yet or not....

 

OSC Ver: 2.3.1

Modular Front Page: 1.3.1

Server: Windows 2008R2, IIS 7.x

PHP: 5.2.13

 

After installing Modular Front Page, everything appeared in the admin panel and I was able to configure all the modules.

 

However, when viewing the site via the http://www.mysite.com/catalog url, nothing would show up in the main area of the store.

If I viewed the site using the full url i.e. http://www.mysite.com/catalog/index.php everything shows up as expected.

 

The bug is in the way my IIS 7.x host setup the default document.

 

In IIS, the default document is Index.php (note the capital i), in windows Index.php is the same as index.php, so my store shows up. When the scripts says:

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

there is no match on IIS because $PHP_SELF is equal to the document IIS asked for, not the actual document being processed.

 

My fix was to open IIS and delete Index.php from the default Document and replace it with index.php.

 

Hope this helps.

 

James

Link to comment
Share on other sites

I didn't know that IIS capitalized the index filename. I'll have to remember that one. Glad to hear that you figured it out.

 

Regards

Jim

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

Link to comment
Share on other sites

Hello!

I've had this add-on installed for a while and it is truly great. However, I had been trying to figure out how to modify "text main" as I couldn't do it on the admin panel. I guess it was a fluke, as I was able to go in this morning and the text was available for me to change. Now, I need to make some edits and, again, the text is not available. I get this error: Parse error: parse error in /Library/WebServer/Documents/catalog/admin/modules.php(232) : eval()'d code on line 1

Strange, huh?

 

This is what I have for line 232 on that file:

if ($value['set_function']) {
	  eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
    } else {
	  $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
    }
    $keys .= '<br /><br />';
  }

 

Thanks in advance!

Link to comment
Share on other sites

I don't always get alerts when someone posts. If I don't answer in a day or so, send an email or PM pointing to your post.

 

This is caused by an unescaped single quote/apostrophe. You need to escape your ' like this \'

 

Regards

Jim

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

Link to comment
Share on other sites

No problem, Jim! I figured you were not getting alerts and I was trying to get your attention (not to rush you, but just in case you were not getting an alert) but your account is not able to receive messages at this point. I always appreciate your help!!!!!

 

I can't even access my text anymore. If that's where the unescaped apostrophe is. I don't see it the snippet of code above.

 

Thanks again for all your help!!!!!!!!!!!!!

Veronica

Link to comment
Share on other sites

Search your database for MODULE_FRONT_PAGE_TEXT_MAIN_% (using the LIKE selector). The number of rows it returns is equal to the number of languages you have installed. For each row, delete the text in the configuration_value column, or add the backslashes to escape the single quotes in the text.

 

Regards

Jim

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

Link to comment
Share on other sites

I have the same issue as snuggtopz. The module does not appear in the modules section. I have an otherwise correct configuration and have checked to insure that each of the files is uploaded to the correct folders...... help.....

 

 

Thanks

Link to comment
Share on other sites

Read all of the responses to his posts. That's all I can do in cases like this. You have put something in the wrong place, or you have a configuration error. That's all there is.

 

Regards

Jim

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

Link to comment
Share on other sites

Help please! crying.gif

 

I installed Modular Front Page and whenever I enable the Scroller and reload the home page (index.php) I get this error:

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') order by rand() limit ' at line 13

 

select p.products_id, p.products_image, pd.products_name from products p join products_description pd on pd.products_id = p.products_id where p.products_status = '1' and pd.language_id = '1' and p.products_id in () order by rand() limit 20

 

[TEP STOP]

 

Also, I cannot get the Banner Rotator to display when it's enabled. I added the sample images in the Banner Manager and assigned them to the group "rotator" but the rotator does not display.

 

-Melodie

Link to comment
Share on other sites

I'd like to have a full width banner(960 pic). How can I do this? I've already dissabled all right and left modules. But what else chages do I need to do ?

#bannerRotator {
 margin-top:5px;
 width: 950px;  /* Banner width + 10 */
 height: 150px;  /* Banner height */
 overflow: hidden;
 position: relative;
}
.....
#bannerRotator ul li {
 display: none;
 margin: 0 auto;
 width: 940px;  /* Banner width */
 height: 150px;  /* Banner height */
/*  position: absolute;
 top: 0px;
 left: 0px; */
}

The problem is also that when I tring compatibility mode, the size of baner changes :(

Edited by alexejk
Link to comment
Share on other sites

... error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') order by rand() limit ' at line 13

.

You're using the Featured Products option without specifying any products to feature. Read the User's Manual section on the Scroller for instructions.

 

Also, I cannot get the Banner Rotator to display when it's enabled. I added the sample images in the Banner Manager and assigned them to the group "rotator" but the rotator does not display. -Melodie

 

You've made some other error. Check that you have all of the files uploaded and that they are in the right places. A missing Javascript file is the most likely cause.

 

Regards

Jim

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

Link to comment
Share on other sites

I'd like to have a full width banner(960 pic). How can I do this? I've already dissabled all right and left modules. But what else chages do I need to do ?... The problem is also that when I tring compatibility mode, the size of baner changes :(

 

The maximum banner width is 950 pixels unless you have a different grid template. The 960 grid that osCommerce uses has 5 pixel gutters on each side of the image. The changes that you made appear correct for a 940 pixel banner.

 

Regards

Jim

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

Link to comment
Share on other sites

 

The maximum banner width is 950 pixels unless you have a different grid template. The 960 grid that osCommerce uses has 5 pixel gutters on each side of the image. The changes that you made appear correct for a 940 pixel banner.

 

Regards

Jim

Is it normal then in IE9 in Compatibility mode the picture has a gap at right?

Can I somehow to avoid this 5 pixel gutters?

Edited by alexejk
Link to comment
Share on other sites

IE9 is badly broken. We'll probably have to wait for a service pack to fix the bugs. At least I hope they'll fix the bugs. I don't know of any way around this issue otherwise.

 

As I said, the gutters are built into the 960 grid. You can try adding the alpha and omega classes to the <div id="bannerRotator"> in the banner_rotator.php module file. I have not tested that, but it should work.

 

Regards

Jim

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

Link to comment
Share on other sites

I was looking to get some help in regards to styling issues for the scroller. Currently I have set the width at 785px but this does not display correctly in Internet Explorer and when I change this to 806px then this shows up fine in Internet Explorer but then shows too wide in Opera, Firefox etc.. I was wondering if I can add conditional styles for IE, but I am not sure how within the scroller.php.

 

I am guessing the following section is what I need to duplicate but with <--if IE> at the top.

 

$header .= '#scroller {' . "\n";
    $header .= '  width: 785px;' . "\n";
    $header .= '  height: ' . MODULE_FRONT_PAGE_SCROLLER_MODULE_HEIGHT . 'px;' . "\n";
    $header .= '  position: relative;' . "\n";
    $header .= '  padding: 10px;' . "\n";
    $header .= '  margin: 10px 0 10px 0;' . "\n";
    $header .= '  border: 1px solid #d6d3d6;' . "\n";
    $header .= '}' . "\n\n";

Link to comment
Share on other sites

I'd like to make every page modular, but I don't have the time to code and release it. You could use the old 2.2 banner rotator on any page with a minor modification to the page. It's the same base code, I just modified it to make it a module.

 

Regards

Jim

 

Edit: Link added.

Edited by kymation

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

Link to comment
Share on other sites

OK - finally got things running - appreciate the mod by the way Jim. However I kind of new to php / css / java. Can anyone tell me how to quickly - without me spending days trying to figure it out. How do I change the background and color in the scroller.

 

Appreciate the response.

 

Thanks

Link to comment
Share on other sites

The scroller is contained in a div with an ID of scroller, so you could add some lines to that style in the catalog/includes/modules/front_page/scroller.php:

 

	    $header .= '#scroller {' . "\n";
    $header .= '  width: 610px;' . "\n";
    $header .= '  height: ' . MODULE_FRONT_PAGE_SCROLLER_MODULE_HEIGHT . 'px;' . "\n";
    $header .= '  position: relative;' . "\n";
    $header .= '  padding: 10px;' . "\n";
    $header .= '  margin: 10px 0 10px 0;' . "\n";
    $header .= '  border: 1px solid #000;' . "\n";
    $header .= '}' . "\n\n";

Regards

Jim

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

Link to comment
Share on other sites

kymation, thanks for your response. My query was how I could write some conditional styles for IE so I could have the scroller style showing twice but one would be actioned for IE and the normal one for all other browsers. This is the only way I can think of making sure the scroller appears right in terms of width size. For example not sure if the following would work for IE and the normal one for all other browsers:

 

$header .= '<!--[if IE]>' . "\n";
$header .= '#scroller {' . "\n";
$header .= '  width: 806px;' . "\n";
...
$header .= '}' . "\n\n";
<![endif]-->

 

$header .= '#scroller {' . "\n";
$header .= '  width: 785px;' . "\n";
...
$header .= '}' . "\n\n";

 

Another problem in Internet Explorer is that the scroller shows 2 rows of products when I use the full 10 products and again I am struggling to understand how to fix this as all other browsers show up fine. Thanks for your help once again.

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...