Jump to content
jcisar

Featured Product Support v1.5.4

Recommended Posts

Hi Guys.

 

Just installed this and Im getting this error on the admin side when I click on featured products?

 

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 '-20, 20' at line 1

 

select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status from products p, featured s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -20, 20

 

Any idea how to fix this? My client wants a fix ASAP, so Im relying on you guys! :rolleyes:

 

 

Update- Seems its a flaw when there are no featured products selected, but I cant add featured products if I cant access this menu? Confused is I

Edited by Gshot

Share this post


Link to post
Share on other sites
Hi Guys.

 

Just installed this and Im getting this error on the admin side when I click on featured products?

 

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 '-20, 20' at line 1

 

select p.products_id, pd.products_name, s.featured_id, s.featured_date_added, s.featured_last_modified, s.expires_date, s.date_status_change, s.status from products p, featured s, products_description pd where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = s.products_id order by pd.products_name limit -20, 20

 

Any idea how to fix this? My client wants a fix ASAP, so Im relying on you guys! :rolleyes:

 

 

Update- Seems its a flaw when there are no featured products selected, but I cant add featured products if I cant access this menu? Confused is I

 

 

Fixed using this thread - http://forums.oscommerce.com/index.php?showtopic=144095

Share this post


Link to post
Share on other sites

Hello,

 

Any idea on how to make featured products box only show up inside categories, and not on the main page?

 

 

Thanks,

floydax

Share this post


Link to post
Share on other sites

Hi,

 

I'm trying to apply this modification, but I'm not able to find the code to replace.

 

This is from the header of catalog/includes/modules/featured.php:

 

/*

$Id: featured.php,v 1.7 2008/08/22 22:30:20 aa0001 Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

 

Featured Products V1.1

Displays a list of featured products, selected from admin

For use as an Infobox instead of the "New Products" Infobox

*/

 

Is that the correct file ? need to update anything ?

 

Thanks,

 

Sergio

 

Hi

 

Open file

 

catalog/includes/modules/featured.php

 

1- find:

 

$featured_products['products_name'] = tep_get_products_name($featured_products['products_id']);

 

ADD after:

 

	$sql = 'SELECT `products_description` FROM `products_description` WHERE products_id ='.$featured_products['products_id'].' && language_id='.(int)$languages_id;
$description_query = tep_db_query($sql);
$description = mysql_fetch_array($description_query, MYSQL_ASSOC);		
$description['products_description'] = substr($description['products_description'], 0, 80);
$desc_len = strlen($description['products_description']);
$description['products_description'][$desc_len-1] = '.';
$description['products_description'][$desc_len-2] = '.';
$description['products_description'][$desc_len-3] = '.';
$description['products_description'] = ereg_replace("(Array)", "", $description['products_description']);

 

 

80 is the number of character of the short description, you can change it

 

 

2- In the same file FIND:

 

. '</a><br><s>' .

 

REPLACE with:

 

. '</a><br>' . strip_tags($description['products_description']) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']). '">' . DESCR_READ_MORE . '</a><br>  <a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id']) . '">' . tep_image_button('cart_buy.gif', IMAGE_BUTTON_BUY_NOW) . '</a> <s>' .

 

 

3- In the same file FIND:

 

. '</a><br>' .

 

REPLACE with:

 

. '</a><br>' . strip_tags($description['products_description']) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']). '">' . DESCR_READ_MORE . '</a><br>  <a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id']) . '">' . tep_image_button('cart_buy.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ' .

 

 

 

4- open file:

 

catalog/includes/languages/english.php

 

and ADD this:

 

//Short description in products modules Start
define('DESCR_READ_MORE', '<FONT color=blue>more info+.</FONT>'); // ... read more.
//Short description in products modules End

 

This add a short description, button buy now and a "more info+" link to product description

 

 

nicko107

Share this post


Link to post
Share on other sites

thanks for the great contribution, I have installed it , but a little problem appears:

 

When i click the Categories->Hardware, the "Featured Products in Hardware" box appears under the Sub Categories,

 

I don't want the box appears here, and how to modify it ?

 

 

and I set the ADMIN->Configuration->Featured->Include Sub Categories When Displaying Featured Products value to false,but

 

nothing changes.

 

 

 

any body can helps?

 

 

Thanks

 

 

JUN

Share this post


Link to post
Share on other sites

Hello, I've just installed Featured Products 1.6.3. I do not use the simple template system.

 

I have been in the admin area and set 2 of my test products to be featured and set the total amount of products to be featured as 2. For some reason it's only showing me 1 featured product in the store front side column and I can't get more then 1 to show.

 

Is this normal for the side column or is there a problem? I need more to show (1 under the other and so on). I don't use the centre column just the side one.

 

Hope someone can help,

Lee

Share this post


Link to post
Share on other sites

As well as the above I've just noticed that if I set Display Featured Products to False in the admin area, the store front still shows them. It doesn't appear to be taking any note of the options I set under Admin > Configuration > Featured. The changes are definitely being saved because they're the same next time I go into admin.

Share this post


Link to post
Share on other sites

Hi,

 

I've realised that the options to display featured products does not include the side column. So this is normal. Please ignore the above.

 

Does anyone know how to display more then 1 featured product in the side column? I need about 5, all underneith each other?

Share this post


Link to post
Share on other sites

I need to add something to the tables, but i cant figure out what i'm doing wrong. I need to have manufacturer_image at the frontpage in my featured box. Wich statements do i have to put WHERE ?

 

i'm confused. Please someone help me out

Share this post


Link to post
Share on other sites

thanks for this helpful CONTRI.

 

here i have two ask , hope u can help me

 

1.how to add a little arrow icon (such as what's new box) to the right of the boxheading of the Featured Product?

2.how to set the font of the text " Featured Products" in the boxheading?

 

 

thanks a lot

 

 

JUN

Share this post


Link to post
Share on other sites
Worked it out altered the code

 }	
$col ++;
if ($col > 2) {
  $col = 0;
  $row ++;
}

 

to:

 }	
$row ++;
if ($col > 2) {
  $col = 0;
  $row ++;
}

 

Thanks you saved me lots of time with this example

i needed 2 colum and two rows to i changed it to:

$col ++;

if ($col > 1) {

$col = 0;

$row ++;

}

Share this post


Link to post
Share on other sites

Hello,

 

Thanks for this great contribution.

 

Just yesterday my hosting provider upgraded our server to PHP 5.2.9. This was sneaky on their part because our server originally had 5.0.5 installed. I won't go into anymore details, but it has caused some problems.

 

In particular to this contribution: When I searched for a product code in Admin to add it to the featured products list and then clicked the product code to add the product and choose an end date, the product id wasn't being picked up by featured.php and so I would get the product dropdown and would have to choose the product all over again.

 

I discovered that if if replaced

	  if ( ($action == 'new') && isset($HTTP_GET_VARS['prodID']) ) {
	  $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = '". (int) $HTTP_GET_VARS['prodID']. "'");
	  $product = tep_db_fetch_array($product_query);
	  $sInfo = new objectInfo($product);
  }

 

with

 

	  if ( ($HTTP_GET_VARS['action'] == 'new') && isset($HTTP_GET_VARS['prodID']) ) {
	  $product_query = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = '". (int) $HTTP_GET_VARS['prodID']. "'");
	  $product = tep_db_fetch_array($product_query);
	  $sInfo = new objectInfo($product);
  }

 

in lines 115 - 119 that everything worked.. I also needed to replace the

$action == 'new'

on line 140 with

$HTTP_GET_VARS['action'] == 'new'

.

 

I discovered the same issue with the Product Extra Fields contribe. I needed to use the

$HTTP_GET_VARS

version in the code as well.

 

Does anyone now why this is? Will this be an issue for this contrib? I have a feeling I am going to be dealing with this issue in a number of places, but I haven't spotted very many just yet.

 

aabe51

Share this post


Link to post
Share on other sites

It's because Register Globals has been turned off. It's going to be an issue with a lot of Contributions. There is a Contribution to fix Register Globals. No guarantees, but it might help.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites
It's because Register Globals has been turned off. It's going to be an issue with a lot of Contributions. There is a Contribution to fix Register Globals. No guarantees, but it might help.

 

Regards

Jim

 

 

Thanks Jim, I will look into it.

 

aabe

Share this post


Link to post
Share on other sites

Hello:

 

I installed Featured Products v1.6.3 but my store have crashed down and doesn't work now.

 

You can see the problem here:

 

http://www.frikigamer.es/tienda/

 

 

That's what there is in "home/gtoyzbj/public_html/tienda/includes/application_top.php on line 504":

 

 

require (DIR_WS_CLASSES.'sts.php');

 

 

Please, help me. I've lost all my work

Share this post


Link to post
Share on other sites

I'm hoping there is still some kind of support for this contribution. <_<

 

I'm running MS2 2.2 (see my signature), MySQL 5 & PHP5 with register globals off. I am also getting ready to use the STS contrib.

 

I downloaded version 1.6.3 and asume I'll also need the v1.6.4 update for RG off.

 

Will this contrib work for my installation?

 

Here's the biggy...

 

Can I have the infobox display in the right column, with (example) 3 products listed in one row?

If so, can anyone point me towards how I can do that without making a mess of things?


- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Share this post


Link to post
Share on other sites

Hi,

 

I've installed the Featured Products contribution which appears to be working correctly until I try to add a product. After selecting the expiry date I get the following error:

 

1292 - Incorrect datetime value: '' for column 'expires_date' at row 1

 

insert into featured (products_id, featured_date_added, expires_date, status) values ('144', now(), '', '1')

 

[TEP STOP]

 

I can manually insert records to the 'featured' table via PHPAdmin but of course I would be easier and better to do it via the control panel. I am guessing I may have made a mistake in editing the files. Any sugstions would be appreciated with regards to where I should look to check.

 

Many thanks in advance for a great contribution!

 

Rob.

Share this post


Link to post
Share on other sites

Hello,

 

I have this contribution installed which works great but does anyone know how to add a second or more featured products boxes to the main page? Basically I want to end up with a featured products box for each category ie. Featured CDs, Featured DVDs, Featured Vinyl etc. Can anyone help?

 

Cheers,

Mark.

Share this post


Link to post
Share on other sites

Can someone please tell how to fix it when it only shows 1 product in the center box when using STS ???

 

I read about that there were 2 options for the boxes but havnt seen anything about that in the package.......

Share this post


Link to post
Share on other sites

Forget the q above i fixed it.. My index.php doesnt look like it do in the install file...

 

BUT how can i remove the text under the product images in the center box ?? Nothing i do seems to remove it :-(

Share this post


Link to post
Share on other sites

Wow! ...what a ball breaker this contrib was to mod to suit a prepurchased template OSC. :blink:

 

It worked perfectly first install and no probs whatsoever. Kudos for that. B)

 

My php skills aren't so polished as to be able to just type away and make it dance so I really struggled to integrate it into the store.

The good news is - and is why I am posting, is I got it to work and look exactly as if it was the template.

I had to edit the includes/classes/boxes.php and the includes/modules/featured.php files to do it.

Share this post


Link to post
Share on other sites

I´ve installed featured products 1.6.3 and my site doesnt work at all

No error message what so ever

 

The admin panel works though

 

Here is the site: http://www.brundin.biz

 

Please help!

 

Managed to get it working by importing my database in phpmyadmin.

Evidently it was a database problem, but what could have caused it?

Share this post


Link to post
Share on other sites

Hi everyone!

I added this contribution a long time ago...and when I added it I lost my footer. I didn't mind at the time, but now I want it back lol has anyone else had this problem, and how did you fix it? It has been so long since I added it, I wouldn't even know where to start.

Thanks!

Share this post


Link to post
Share on other sites

Hi, I have a small problem :-(

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/vekto2/public_html/duaneosc/includes/application_top.php on line 312

 

Please help me

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×