Jump to content



Latest News: (loading..)

* * * * * 1 votes

[Addon} Modular Front Page


  • Please log in to reply
870 replies to this topic

#861   boltje

boltje
  • Members
  • 7 posts
  • Real Name:Martin Boltje
  • Gender:Male
  • Location:Purmerend, Netherlands

Posted 09 June 2013 - 08:38 PM

Sorry Jim, had to write it a bit more clear with the difference in my pages. As you say, there is no difference in de sql statement.
However, i just replaced my file with the original file for example the fp_scroller.php and imidiatly the error is back.

(if only fp_new_products is active I don't have the sql error and the results of new product items are on my page.)

mysql version 5.5.31

This is the result for the  fp_scroller.php:

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 'where p.products_id not in(45, 82)' at line 18

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 = '4' order by rand() limit 20 where p.products_id not in(45, 82)

[TEP STOP]


#862   kymation

kymation

    Believers

  • Community Sponsor
  • 6,755 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 09 June 2013 - 08:47 PM

The problem is in this SQL: where p.products_id not in(45, 82)

That is not a part of this module. You have another addon that is adding that code, possibly some sort of hidden category addon. It's probably a modification to the includes/database.php functions. That is conflicting with the Front Page modules.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#863   boltje

boltje
  • Members
  • 7 posts
  • Real Name:Martin Boltje
  • Gender:Male
  • Location:Purmerend, Netherlands

Posted 09 June 2013 - 09:09 PM

View Postkymation, on 09 June 2013 - 08:47 PM, said:

The problem is in this SQL: where p.products_id not in(45, 82)

That is not a part of this module. You have another addon that is adding that code, possibly some sort of hidden category addon. It's probably a modification to the includes/database.php functions. That is conflicting with the Front Page modules.

Regards
Jim

Thanx Jim, Yes I have the SHP module, it has a modification in database.php.
Getting late, try to find things out tomorow.

#864   kymation

kymation

    Believers

  • Community Sponsor
  • 6,755 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 09 June 2013 - 09:21 PM

I took a look at that addon's code, and I think I see the problem. When you wake up, try this: Find this line in catalog/includes/functions/database:

else if(stristr($query, " where "))

and replace it with:

else if(stristr($query, " where"))

Yes, there's just one space difference. At least I think that will work. Please let me know if it does.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#865   boltje

boltje
  • Members
  • 7 posts
  • Real Name:Martin Boltje
  • Gender:Male
  • Location:Purmerend, Netherlands

Posted 10 June 2013 - 09:23 AM

View Postkymation, on 09 June 2013 - 09:21 PM, said:

I took a look at that addon's code, and I think I see the problem. When you wake up, try this: Find this line in catalog/includes/functions/database:

else if(stristr($query, " where "))

and replace it with:

else if(stristr($query, " where"))

Yes, there's just one space difference. At least I think that will work. Please let me know if it does.

Regards
Jim

Sometimes life is simple :-) tnx Jim

Changed the /includes/functions/database.php  for the SHP module (one space less)
Regards
Martin

#866   406_JEM

406_JEM
  • Members
  • 3 posts
  • Real Name:Justin

Posted 13 June 2013 - 03:52 AM

Hello,

Great work, super useful.  I've been playing around with a new oscommerce 2.3.x catalog and have Modular Front Page installed and in use successfully. I had no significant issues initially (that I remember), but after installing another mod (Social Login and Social Share Modules) most current loginradius release and that's where the trouble began (only with the Heading Title portion)...  At least I think so, I have looked at your code for a bit, but overall an pretty new to OScommerce CMS structuring so could use a little time saving help if you have any idea what is going on here.  
So... I believe before the S.L. mod install my initial load of the store index show "Welcome To XXX Online..." as the Page Heading Title which was correct; the behavior now after the Social Login install is that the Heading Title shows "My Account Information" (at least after login, I have not dug too much yet, but will have some more time to diagnose tomorrow).  It could be the case that before I log in (traditionally or social login style) the page headings are correct, but I don't believe so and can't remember the exact behavior from this morning before I got pulled away from working on this issue.

live URL...  msdrivetrain.com/store

Any advice is appreciated and If i missed something obvious in the forum I apologize, I did look.

Thanks in advance,
Justin

#867   kymation

kymation

    Believers

  • Community Sponsor
  • 6,755 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 13 June 2013 - 04:51 AM

The Heading Title is defined in store/includes/languages/english/index.php. It sounds like that file was altered or replaced with the one for the account info page. Anyway, just fix the define for HEADING_TITLE and you should be good.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support

#868   406_JEM

406_JEM
  • Members
  • 3 posts
  • Real Name:Justin

Posted 13 June 2013 - 07:24 PM

Hello Jim,

Just got back on this, thanks for the advice.  I looked and it seems the define there is good..

from store/includes/languages/english/index.php
...
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
define('HEADING_TITLE', 'Welcome to ' . STORE_NAME);
define('TABLE_HEADING_IMAGE', '');
...

I keep getting pulled away from this project, but now have time to run a quick text search to see if there is a redefinition of the HEADING_TITILE somewhere, it is not redefined anywhere in the english/index file, but you are correct it is happening somewhere and seems to be a static occurrence...  The only other thing I'm assuming is that it must happen after your code makes the change and is overwritten with the static entry??? currently idk just guessing.

#869   406_JEM

406_JEM
  • Members
  • 3 posts
  • Real Name:Justin

Posted 13 June 2013 - 08:22 PM

OK... I can tentatively state that I think the issue is resolved.  Being relatively unfamiliar with the framework overall I have a feeling that my fix may result in non-standard code (I'm sure there was a better way to fix this, If you can speak to a better resolution I would love to hear).  

I scanned for any and all occurrences of define('HEADING_TITLE and found typical results, but when I came across the socialloginandsocialshare.php occurrence of this it made me curious so I commented this define out and it appears to have correct the issue all together... As stated my concern now is the possibility of non-standard code.  It is a mystery to me why that define would overwrite your more dynamic definitions in EVERY occurrence.  My limited understanding of the framework is hurting me bad in this regard, but I am picking up on the oscommerce modular structures slowly but surely.  I'm not sure what caused the problem initially, but I am thinking an include is probably out of order causing your Page Heading Title in Modular front-page to miss the references for the new login pages and such result in being overwritten and losing the ability to rebind new HEADING_TITLE values via your framework.

anyways thanks for setting me on the right track, gotta move to next issue but if I revisit this and find a better solution I'll repost.

Thanks for all your great work you've shared.
Justin

#870   Nico01

Nico01
  • Members
  • 26 posts
  • Real Name:Nico Simandiris
  • Gender:Male

Posted 13 June 2013 - 10:11 PM

Jim, I installed you brandnew "accordion_categories_menu_1.2.3".

Believe it or not - its working now perfect!

What did you change in the module ?

Thanks for your support.

Best regards
Nico

#871   kymation

kymation

    Believers

  • Community Sponsor
  • 6,755 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 13 June 2013 - 10:34 PM

@406_JEM
PHP only allows you to define a constant once. A second define of the same constant is ignored and a warning is thrown. You won't see the warning message if you have error reporting turned off. My guess is that the social login addon is defining HEADING_TITLE (improperly) and overriding the proper definition. Removing that define is the correct action.

@Nico01
I juggled the div tags to make the output more consistent. It was producing an incorrect output in some configurations. The result was ... odd. This release should now work with all versions of jQuery UI. I hope.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support