Jump to content
jcisar

Featured Product Support v1.5.4

Recommended Posts

First of all 1.6.4 dont have sql as it is only updates, bugfix. Are you using sql file from 1.6.3?

 

Make sure there are no groupe id at no 18 and change if it is taken.

# Find and replace '18' to the next `configuration_group_id` available

# in table `configuration_group`

 

I would also use the english sql file and translate manualy as there is a diffrent in the sql fields in the package.

 

What way are you inserting the sql. phpmyadmin ?

Share this post


Link to post
Share on other sites

Can someone please help me with 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 'MAX_DISPLAY_FEATURED_PRODUCTS' at line 3

 

SELECT p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name FROM products p LEFT JOIN specials s ON p.products_id = s.products_id LEFT JOIN products_description pd ON p.products_id = pd.products_id AND pd.language_id = '1' LEFT JOIN featured f ON p.products_id = f.products_id WHERE p.products_status = '1' AND f.status = '1' order by rand(1658269412) DESC limit MAX_DISPLAY_FEATURED_PRODUCTS

 

[TEP STOP]

 

 

Thank you

Michelle

Share this post


Link to post
Share on other sites

MAX_DISPLAY_FEATURED_PRODUCTS means that you have done somthing wrong in the installation instruction.

Have you run the sql file into your db.

 

MAX_DISPLAY_FEATURED_PRODUCTS is not defined as it should as this value is to be set from mysql db.

 

Check the install instruction again, and se if you have missed somthing. Also use the english sql file as the other language is not up to date. Translate if you need.

Share this post


Link to post
Share on other sites

First of all 1.6.4 dont have sql as it is only updates, bugfix. Are you using sql file from 1.6.3?

 

Make sure there are no groupe id at no 18 and change if it is taken.

# Find and replace '18' to the next `configuration_group_id` available

# in table `configuration_group`

 

I would also use the english sql file and translate manualy as there is a diffrent in the sql fields in the package.

 

What way are you inserting the sql. phpmyadmin ?

Hello,

 

Yes, I'm using both import .sql file into phpMyAdmin and run sql query in to hphMyAdmin. This shows as result:

 

 INSERT INTO `osc_configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES (null, 'New Reviews', 'MAX_DISPLAY_NEW_FEATURED', '15', 'Maximum number of new featured to display', 6, 0, NULL, '2009-12-26 08:14:01', NULL, NULL), (null, 'Featured Level', 'SERVICE_FEATURED_ENABLE_FEATURED', '1', 'Customer level required to write a featured.', 6, 0, NULL, '2009-12-26 08:14:01', NULL, 'osc_cfg_set_boolean_value(array(''0'', ''1'', ''2''))'), (null, 'Moderate featured', 'SERVICE_FEATURED_ENABLE_MODERATION', '1', 'Should featured be approved by store admin.', 6, 0, NULL, '2009-12-26 08:14:01', NULL, 'osc_cfg_set_boolean_value(array(''-1'', ''0'', ''1''))') CREATE TABLE `featured` ( `featured_id` int(11) NOT NULL auto_increment, `products_id` int(11) NOT NULL default '0', `featured_date_added` d[...]

MySQL say:
#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 'CREATE TABLE `featured` (
 `featured_id` int(11) NOT NULL auto_increment,
 `' at line 9 

 

18 in the `configuration_group_id` is not taken. But it in index it said:

 

"Index: Key: PRIMARY Type: PRIMARY Cardinality: 18 Field: configuration_group_id"

 

Any idea?

Share this post


Link to post
Share on other sites

I am not that into mysql, but i can vagely remember that i had some problems with the "not null" part sometimes.

 

Try this code, just cleaned up.

 

# --------------------------------------------------------
# $Id: featured_products_english.sql,v 1.3 2008/08/22 22:30:20 aa0001 Exp $

#
# Table structure for table `featured`
#
# Find and replace '18' to the next `configuration_group_id` available
# in table `configuration_group`

CREATE TABLE `featured` (
 `featured_id` int(11) NOT NULL auto_increment,
 `products_id` int(11) NOT NULL default '0',
 `featured_date_added` datetime default NULL,
 `featured_last_modified` datetime default NULL,
 `expires_date` datetime default NULL,
 `date_status_change` datetime default NULL,
 `status` int(1) default '1',
 PRIMARY KEY  (`featured_id`),
 KEY `idx_products_id` (`products_id`)
) ENGINE=MyISAM;

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('18','Featured', 'Featured Products Display', '18', '1');
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Display Featured Products', 'FEATURED_PRODUCTS_DISPLAY', 'true', 'Set to true or false in order to display featured.', '18', '1', now(), now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Maximum Display of Featured', 'MAX_DISPLAY_FEATURED_PRODUCTS', '6', 'This is the maximum amount of items to display on the front page.', '18', '2', now(), now());
UPDATE `configuration` SET `set_function`="tep_cfg_select_option(array('true', 'false')," WHERE `configuration_key`='FEATURED_PRODUCTS_DISPLAY';
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function) VALUES ('Include Sub Categories When Displaying Featured Products', 'FEATURED_PRODUCTS_SUB_CATEGORIES', 'true', 'Set to true or false in order to display featured including sub categories.', '18', '3', now(), now(), "tep_cfg_select_option(array('true', 'false'),");
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, set_function) VALUES ('Specials Only When Displaying Featured Products', 'FEATURED_PRODUCTS_SPECIALS_ONLY', 'false', 'Set to true or false in order to display only on special featured products.', '18', '4', now(), now(), "tep_cfg_select_option(array('true', 'false'),");

Share this post


Link to post
Share on other sites

First of all 1.6.4 dont have sql as it is only updates, bugfix. Are you using sql file from 1.6.3?

 

Make sure there are no groupe id at no 18 and change if it is taken.

# Find and replace '18' to the next `configuration_group_id` available

# in table `configuration_group`

 

I would also use the english sql file and translate manualy as there is a diffrent in the sql fields in the package.

 

What way are you inserting the sql. phpmyadmin ?

 

Yes, it works now! :-) Thanks!

Edited by WorkingHard

Share this post


Link to post
Share on other sites

Hello,

 

I have installed this add-on, or more correct just data base part. But I'm confused by this:

 

 

 

"4. in the catalog/admin/

go to templetes->templates modules->content

here install the Featured product by clicking on the install button on the right side of the page.

 

5. After then click on the templates->templates modules Layoout->content

 

here click on the insert button then select the featured product within the modules dropdown.

 

 

select the pages like products/* within the pages dropdown box.

select after in the group drop down box.

also sort orderlike 400.

now click on the save button."

 

 

 

What the heck does that means?? I cant find that?

 

!?

 

Please help.

Share this post


Link to post
Share on other sites

Furthermore there are 3 different instructions but not exactly description of which to use for STS template:

 

1) In readme file it said:

 

--------

1. Copy all the files with its related folder.

 

 

2. run the sql file in the phpmyadmin.

 

3. Add this code in

catalog/includes/database_tables.php

 

define('TABLE_FEATURED', 'featured');

 

 

4. in the catalog/admin/

go to templetes->templates modules->content

here install the Featured product by clicking on the install button on the right side of the page.

 

5. After then click on the templates->templates modules Layoout->content

 

here click on the insert button then select the featured product within the modules dropdown.

 

 

select the pages like products/* within the pages dropdown box.

select after in the group drop down box.

also sort orderlike 400.

now click on the save button.

-------

 

NOTE: There is no 'right side of page' etc...? Can this be used for STS OSC installations?

 

2) In 'Install Text' file (that comes with Featured Products v1.6.3 release) there are 2 totally different installation instructions.

 

My question is: Which one to use for STS installations?

 

All 20 steps OR just 15-20 steps?

 

I will really appreciate any help here.

 

Thanks.

Share this post


Link to post
Share on other sites

I am not using STS so i cant be sure.

 

I think you have to do all 20 steps, but only step 15 is the extra changes that are needed for STS.

 

You can also try to read the instruction for 161 or earlyer packages with STS to se if it make any more sence.

Share this post


Link to post
Share on other sites

I am not using STS so i cant be sure.

 

I think you have to do all 20 steps, but only step 15 is the extra changes that are needed for STS.

 

You can also try to read the instruction for 161 or earlyer packages with STS to se if it make any more sence.

Share this post


Link to post
Share on other sites

I am not using STS so i cant be sure.

 

I think you have to do all 20 steps, but only step 15 is the extra changes that are needed for STS.

 

You can also try to read the instruction for 161 or earlyer packages with STS to se if it make any more sence.

Yes I did so and it is working now! Thanks!

 

I have however still one minor 'problem'.

 

In normal OSC (with STS switched off) Featured project box shows as a box on left side and on the index page - just as it should.

 

Switching ON the STS template result in that the left side Featured Project disappear - only the one on index page is left. Can someone recommend what need to be done to fix that missing box?

Share this post


Link to post
Share on other sites

I remember there was a code in the install text you had to put in where you want the box to show.

 

You must add this code to the colum_left file someway or somwhere in the STS code/template.

Share this post


Link to post
Share on other sites

Hi guys,

 

can u help me on this problem:

 

I installed featured products, everything seems to be fine when i try to click on a category of products.

the page is totally messed up with the following message

 

Call to undefined function tep_array_values_to_string() /home/......../public_html/includes/modules/featured.php on line 52

 

 

Many thanks in advance for your answers.

 

Cong

Share this post


Link to post
Share on other sites

You didn't add the code for it to /includes/functions/general.php

 

// Featured Products Mod Begin
function tep_array_values_to_string($array, $separator = ',') {
$get_string = '';
if (sizeof($array) > 0) {
	while (list($key, $value) = each($array)) {
			$get_string .= $value . $separator;
	}
	$remove_chars = strlen($separator);
	$get_string = substr($get_string, 0, -$remove_chars);
}
return $get_string;
}  

It's in the install files.


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 >

Share this post


Link to post
Share on other sites

thank you very much even though i managed to solve the problem. this forum is great. So many talented developers helping the beginners

 

 

You didn't add the code for it to /includes/functions/general.php

 

// Featured Products Mod Begin
function tep_array_values_to_string($array, $separator = ',') {
$get_string = '';
if (sizeof($array) > 0) {
	while (list($key, $value) = each($array)) {
			$get_string .= $value . $separator;
	}
	$remove_chars = strlen($separator);
	$get_string = substr($get_string, 0, -$remove_chars);
}
return $get_string;
}  

It's in the install files.

Share this post


Link to post
Share on other sites

i have an easy question, if someone deigns to answer :huh:

 

which file defines the title text for the featured products box? :D

 

also; is there a coding to display "Featured Products for [current month]"?

Edited by adamsleath

Share this post


Link to post
Share on other sites

Normaly you only have 2 options for language. And normaly you will understand from the install instruction as they are eighter added manualy or there is a file copyed to the language folder.

 

one is in includes/languaga/feature.php (addon name)

or in the include/language/language.php file (english.php)

Share this post


Link to post
Share on other sites

Hi,

 

Im currently using Featured products and need to decrease the space between the products. In what file and were can this be adjusted? As it is now there is just too much whitespace between the products.

 

Richard

Share this post


Link to post
Share on other sites

Hi

ive installed this but in my admin/configuration, i can't find "Featured" , i try to add items in "Featured Products" but my featured module still empty. I've been trying to reinstall but nothing's change. Can you help me ?

 

thanks

Share this post


Link to post
Share on other sites

Hi

ive installed this but in my admin/configuration, i can't find "Featured" , i try to add items in "Featured Products" but my featured module still empty. I've been trying to reinstall but nothing's change. Can you help me ?

 

thanks

 

Hello,

I have just installed Featured Products v 1.6.5 on a store running STSv4.6 and am having a couple of issues but I think I can at least answer your question. If you installed things correctly in the

Admin/Configuration list you will see "Featured", it is at the bottom of my list. You have to turn it "On" and "Off" here. You will then see under Admin/Catalog a "Featured Products". You add your products here.

Hope that helped.

Good Luck

 

RJ

Share this post


Link to post
Share on other sites

Thanks RJ

But i've check my modified files 2 times, its ok, i suppose that trouble lies in my SQL, when i try to import "featured_products_english.sql " ihave error my SQL:#1050 - Table 'featured' already exists

Share this post


Link to post
Share on other sites

Thanks RJ

But i've check my modified files 2 times, its ok, i suppose that trouble lies in my SQL, when i try to import "featured_products_english.sql " ihave error my SQL:#1050 - Table 'featured' already exists

 

 

Joe,

 

I am not an expert, but I do remember bumping into the same thing, I ended up deleting the "Featured" table and then ran a another sql to rebuild it. Once I did that I had more success.

 

RJ

Share this post


Link to post
Share on other sites

Joe,

 

I am not an expert, but I do remember bumping into the same thing, I ended up deleting the "Featured" table and then ran a another sql to rebuild it. Once I did that I had more success.

 

RJ

Its really help me, featured module finally work. I'm very thankful for help.

But one thing that can't understand- why in my featured module only five items, i change Maximum Display of Featured on 9 and add in Featured Products proper amounts of products but still image only 5)

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

×