Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error: syntax error, unexpected $end in /hsphere/local/home/----mydomain----/includes/boxes/categories.php on line 138


waleed_hagag

Recommended Posts

After i installed the products tab 2.1 and the UltraPics - MS2 Image Addon Pack! i got this error when i click any products for details info ......

 

 

 

 

 

Parse error: syntax error, unexpected $end in /hsphere/local/home/----mydomain----/includes/boxes/categories.php on line 138

 

 

 

but at the admin page everything running perfect and i have no problems...

 

 

This is the content of the file categories.php

********************************************************************************

*

********************************************************************************

<?php

/*

$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br>';

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

 

?>

<!-- categories //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 

new infoBoxHeading($info_box_contents, true, false);

 

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

//------------------------

if (tep_not_null($cPath)) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

tep_show_category($first_element);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- categories_eof //--> This is the line 138

********************************************************************************

 

********************************************************************************

 

 

 

Any Help ???

 

online.it-mentors.net is my domain that have the problem

 

Waleed Hagag

[email protected]

Edited by waleed_hagag
Link to comment
Share on other sites

<?php
/*
$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License
*/

function tep_show_category($counter) {
global $tree, $categories_string, $cPath_array;

 for ($i=0; $i<$tree[$counter]['level']; $i++) {
$categories_string .= "  ";
 }

 $categories_string .= '<a href="';

 if ($tree[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
 } else {
$cPath_new = 'cPath=' . $tree[$counter]['path'];
 }

 $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '<b>';
 }

// display category name
 $categories_string .= $tree[$counter]['name'];

 if (isset($cPath_array) && in_array($counter, $cPath_array)) {
$categories_string .= '</b>';
 }

 if (tep_has_category_subcategories($counter)) {
$categories_string .= '->';
 }

 $categories_string .= '</a>';

 if (SHOW_COUNTS == 'true') {
$products_in_category = tep_count_products_in_category($counter);
if ($products_in_category > 0) {
  $categories_string .= ' (' . $products_in_category . ')';
}
 }

 $categories_string .= '<br>';

 if ($tree[$counter]['next_id'] != false) {
tep_show_category($tree[$counter]['next_id']);
 }
}

?>
<!-- categories //-->
<tr>
<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 new infoBoxHeading($info_box_contents, true, false);

 $categories_string = '';
 $tree = array();

 $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

 while ($categories = tep_db_fetch_array($categories_query)) {
$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],
															   'parent' => $categories['parent_id'],
															   'level' => 0,
															   'path' => $categories['categories_id'],
															   'next_id' => false);

if (isset($parent_id)) {
  $tree[$parent_id]['next_id'] = $categories['categories_id'];
}

$parent_id = $categories['categories_id'];

if (!isset($first_element)) {
  $first_element = $categories['categories_id'];
}
 }

//------------------------
 if (tep_not_null($cPath)) {
$new_path = '';
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
  unset($parent_id);
  unset($first_id);
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");
  if (tep_db_num_rows($categories_query)) {
	$new_path .= $value;
	while ($row = tep_db_fetch_array($categories_query)) {
	  $tree[$row['categories_id']] = array('name' => $row['categories_name'],
										   'parent' => $row['parent_id'],
										   'level' => $key+1,
										   'path' => $new_path . '_' . $row['categories_id'],
										   'next_id' => false);

	  if (isset($parent_id)) {
		$tree[$parent_id]['next_id'] = $row['categories_id'];
	  }

	  $parent_id = $row['categories_id'];

	  if (!isset($first_id)) {
		$first_id = $row['categories_id'];
	  }

	  $last_id = $row['categories_id'];
	}
	$tree[$last_id]['next_id'] = $tree[$value]['next_id'];
	$tree[$value]['next_id'] = $first_id;
	$new_path .= '_';
  }
  else {
	break;
  }
}
 }
 tep_show_category($first_element); 

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $categories_string);

 new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- categories_eof //-->

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 >

Link to comment
Share on other sites

After i installed the products tab 2.1 and the UltraPics - MS2 Image Addon Pack! i got this error when i click any products for details info ......

 

 

 

 

 

Parse error: syntax error, unexpected $end in /hsphere/local/home/----mydomain----/includes/boxes/categories.php on line 138

 

 

 

but at the admin page everything running perfect and i have no problems...

 

 

This is the content of the file categories.php

********************************************************************************

*

********************************************************************************

<?php

/*

$Id: categories.php,v 1.25 2003/07/09 01:13:58 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br>';

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

 

?>

<!-- categories //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CATEGORIES);

 

new infoBoxHeading($info_box_contents, true, false);

 

$categories_string = '';

$tree = array();

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

while ($categories = tep_db_fetch_array($categories_query)) {

$tree[$categories['categories_id']] = array('name' => $categories['categories_name'],

'parent' => $categories['parent_id'],

'level' => 0,

'path' => $categories['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $categories['categories_id'];

}

 

$parent_id = $categories['categories_id'];

 

if (!isset($first_element)) {

$first_element = $categories['categories_id'];

}

}

 

//------------------------

if (tep_not_null($cPath)) {

$new_path = '';

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

unset($parent_id);

unset($first_id);

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$value . "' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$languages_id ."' order by sort_order, cd.categories_name");

if (tep_db_num_rows($categories_query)) {

$new_path .= $value;

while ($row = tep_db_fetch_array($categories_query)) {

$tree[$row['categories_id']] = array('name' => $row['categories_name'],

'parent' => $row['parent_id'],

'level' => $key+1,

'path' => $new_path . '_' . $row['categories_id'],

'next_id' => false);

 

if (isset($parent_id)) {

$tree[$parent_id]['next_id'] = $row['categories_id'];

}

 

$parent_id = $row['categories_id'];

 

if (!isset($first_id)) {

$first_id = $row['categories_id'];

}

 

$last_id = $row['categories_id'];

}

$tree[$last_id]['next_id'] = $tree[$value]['next_id'];

$tree[$value]['next_id'] = $first_id;

$new_path .= '_';

} else {

break;

}

}

}

tep_show_category($first_element);

 

$info_box_contents = array();

$info_box_contents[] = array('text' => $categories_string);

 

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- categories_eof //--> This is the line 138

********************************************************************************

 

********************************************************************************

 

 

 

Any Help ???

 

online.it-mentors.net is my domain that have the problem

 

Waleed Hagag

[email protected]

 

 

I discovered the error that makes this problem and i did it and it works fine but i had another error which make duplication of columns when i click the products info page ...

 

 

The solution is as follow

 

Just adding of this red code /* then */

 

Simple but makes me searching for 1 week

 

 

/*

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

for ($i=0; $i<$tree[$counter]['level']; $i++) {

$categories_string .= "  ";

}

 

$categories_string .= '<a href="';

 

if ($tree[$counter]['parent'] == 0) {

$cPath_new = 'cPath=' . $counter;

} else {

$cPath_new = 'cPath=' . $tree[$counter]['path'];

}

 

$categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">';

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '<b>';

}

 

// display category name

$categories_string .= $tree[$counter]['name'];

 

if (isset($cPath_array) && in_array($counter, $cPath_array)) {

$categories_string .= '</b>';

}

 

if (tep_has_category_subcategories($counter)) {

$categories_string .= '->';

}

 

$categories_string .= '</a>';

 

if (SHOW_COUNTS == 'true') {

$products_in_category = tep_count_products_in_category($counter);

if ($products_in_category > 0) {

$categories_string .= ' (' . $products_in_category . ')';

}

}

 

$categories_string .= '<br>';

 

if ($tree[$counter]['next_id'] != false) {

tep_show_category($tree[$counter]['next_id']);

}

 

*/

 

 

Waleed Hagag

Edited by waleed_hagag
Link to comment
Share on other sites

  • 2 weeks later...

Where can I find a .Zip file of the Product Tabs 2.1 ( Fixed and Full English Version Modified by Waleed Hagag ) Package (OsC Contribution 2610) ?

Thanks!

At least 90% of my programming problems lie somewhere between my keyboard and my chair.

Link to comment
Share on other sites

 

Hi,

 

Have installed the contrib. in a fresh installed OSC. The error I get is

 

 

in product listing.

1054 - Unknown column 'p.products_image_med' in 'field list'

select p.products_id, pd.products_name, pd.products_description, pd.products_spec, pd.products_musthave, pd.products_extraimage, pd.products_manual, pd.products_extra1, pd.products_moreinfo, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from products p, products_description pd where p.products_status = '1' and p.products_id = '214' and pd.products_id = p.products_id and pd.language_id = '1'

[TEP STOP]

 

in product description when try to create product

 
Products Quantity:   

Products Model:   

1054 - Unknown column 'products_image_med' in 'where clause'

select count(*) as total from products where products_image='' or products_image_med='' or products_image_lrg=''

 

Is there any fix for this? Thanks :)

Link to comment
Share on other sites

SO I am confused.. Did you upload a working package or does your package not work??

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Hi,

 

Have installed the contrib. in a fresh installed OSC. The error I get is

 

 

in product listing.

1054 - Unknown column 'p.products_image_med' in 'field list'

select p.products_id, pd.products_name, pd.products_description, pd.products_spec, pd.products_musthave, pd.products_extraimage, pd.products_manual, pd.products_extra1, pd.products_moreinfo, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from products p, products_description pd where p.products_status = '1' and p.products_id = '214' and pd.products_id = p.products_id and pd.language_id = '1'

[TEP STOP]

 

in product description when try to create product

 
Products Quantity:   

Products Model:   

1054 - Unknown column 'products_image_med' in 'where clause'

select count(*) as total from products where products_image='' or products_image_med='' or products_image_lrg=''

 

Is there any fix for this? Thanks :)

It would seem that the mod has included segments of another contribution that gives 3 images (small, medium and large). Perhaps the author of the mod can fix it and upload a new package.

Link to comment
Share on other sites

SO I am confused.. Did you upload a working package or does your package not work??

I seriously am not sure if it's me or the package but I have done exactly as per the installation.

 

Upload all the files attached.

Run the SQL.

 

:(

 

It would seem that the mod has included segments of another contribution that gives 3 images (small, medium and large). Perhaps the author of the mod can fix it and upload a new package.

 

I hope so too.

Link to comment
Share on other sites

the package include another module to make 3 image for eah product that's why u had this error ...

i will make another contribution to fix ur problem ...

 

 

WHAT U DID IS PERFECT , BUT PLEASE CAN U TELL ME THE LINK OF YOUR SITE ????

 

I seriously am not sure if it's me or the package but I have done exactly as per the installation.

 

Upload all the files attached.

Run the SQL.

 

:(

 

 

 

I hope so too.

Link to comment
Share on other sites

AFTER I READ THE INSTALLATION FILE AND YOUR ERROR I FOUND THAT

 

it seems u forgot to add the sql part

 

Add this sql statement (UltraPics - MS2 Image Addon Pack)

INSERT INTO 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 ('', 'Enable Additional Images?', 'ULTIMATE_ADDITIONAL_IMAGES', 'enable', 'Display Additional Images below Product Description?', 4, 10, now(), now(), NULL, 'tep_cfg_select_option(array(\'enable\', \'disable\'),');

INSERT INTO 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 ('', 'Additional Thumb Width', 'ULT_THUMB_IMAGE_WIDTH', '140', 'The pixel width of additional thumb images', 4, 11, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Additional Thumb Height', 'ULT_THUMB_IMAGE_HEIGHT', '120', 'The pixel height of additional thumb images', 4, 12, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Medium Image Width', 'MEDIUM_IMAGE_WIDTH', '200', 'The pixel width of medium images', 4, 13, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Medium Image Height', 'MEDIUM_IMAGE_HEIGHT', '200', 'The pixel height of medium images', 4, 14, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Large Image Width', 'LARGE_IMAGE_WIDTH', '400', 'The pixel width of large images', 4, 15, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Large Image Height', 'LARGE_IMAGE_HEIGHT', '400', 'The pixel height of large images', 4, 16, now(), now(), NULL, NULL);

ALTER TABLE `products` ADD `products_image_med` VARCHAR(64) AFTER `products_image`;

ALTER TABLE `products` ADD `products_image_lrg` VARCHAR(64) AFTER `products_image_med`;

ALTER TABLE `products` ADD `products_image_sm_1` VARCHAR(64) AFTER `products_image_lrg`;

ALTER TABLE `products` ADD `products_image_xl_1` VARCHAR(64) AFTER `products_image_sm_1`;

ALTER TABLE `products` ADD `products_image_sm_2` VARCHAR(64) AFTER `products_image_xl_1`;

ALTER TABLE `products` ADD `products_image_xl_2` VARCHAR(64) AFTER `products_image_sm_2`;

ALTER TABLE `products` ADD `products_image_sm_3` VARCHAR(64) AFTER `products_image_xl_2`;

ALTER TABLE `products` ADD `products_image_xl_3` VARCHAR(64) AFTER `products_image_sm_3`;

ALTER TABLE `products` ADD `products_image_sm_4` VARCHAR(64) AFTER `products_image_xl_3`;

ALTER TABLE `products` ADD `products_image_xl_4` VARCHAR(64) AFTER `products_image_sm_4`;

ALTER TABLE `products` ADD `products_image_sm_5` VARCHAR(64) AFTER `products_image_xl_4`;

ALTER TABLE `products` ADD `products_image_xl_5` VARCHAR(64) AFTER `products_image_sm_5`;

ALTER TABLE `products` ADD `products_image_sm_6` VARCHAR(64) AFTER `products_image_xl_5`;

ALTER TABLE `products` ADD `products_image_xl_6` VARCHAR(64) AFTER `products_image_sm_6`;

 

 

 

because the error means that u have missing tables at your sql database and these tables for the (UltraPics - MS2 Image Addon Pack) so all u need to do is to be sure that u uploaded the previous sql tables and that u had this part at the file (catalog/products_info.php)

 

//Product Tabs 2.0 Start

// BOF

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_spec, pd.products_musthave, pd.products_extraimage, pd.products_manual, pd.products_extra1, pd.products_moreinfo, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

// EOF

//Product Tabs 2.0 End

 

check the file at the attached Product Tabs 2.1 ( Fixed and Full English Version Modified by Waleed Hagag )

 

the module is working perfect at my site www.a100100.com

you can check it

 

the package include another module to make 3 image for eah product that's why u had this error ...

i will make another contribution to fix ur problem ...

 

 

WHAT U DID IS PERFECT , BUT PLEASE CAN U TELL ME THE LINK OF YOUR SITE ????

Link to comment
Share on other sites

AFTER I READ THE INSTALLATION FILE AND YOUR ERROR I FOUND THAT

 

it seems u forgot to add the sql part

 

Add this sql statement (UltraPics - MS2 Image Addon Pack)

INSERT INTO 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 ('', 'Enable Additional Images?', 'ULTIMATE_ADDITIONAL_IMAGES', 'enable', 'Display Additional Images below Product Description?', 4, 10, now(), now(), NULL, 'tep_cfg_select_option(array(\'enable\', \'disable\'),');

INSERT INTO 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 ('', 'Additional Thumb Width', 'ULT_THUMB_IMAGE_WIDTH', '140', 'The pixel width of additional thumb images', 4, 11, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Additional Thumb Height', 'ULT_THUMB_IMAGE_HEIGHT', '120', 'The pixel height of additional thumb images', 4, 12, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Medium Image Width', 'MEDIUM_IMAGE_WIDTH', '200', 'The pixel width of medium images', 4, 13, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Medium Image Height', 'MEDIUM_IMAGE_HEIGHT', '200', 'The pixel height of medium images', 4, 14, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Large Image Width', 'LARGE_IMAGE_WIDTH', '400', 'The pixel width of large images', 4, 15, now(), now(), NULL, NULL);

INSERT INTO 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 ('', 'Large Image Height', 'LARGE_IMAGE_HEIGHT', '400', 'The pixel height of large images', 4, 16, now(), now(), NULL, NULL);

ALTER TABLE `products` ADD `products_image_med` VARCHAR(64) AFTER `products_image`;

ALTER TABLE `products` ADD `products_image_lrg` VARCHAR(64) AFTER `products_image_med`;

ALTER TABLE `products` ADD `products_image_sm_1` VARCHAR(64) AFTER `products_image_lrg`;

ALTER TABLE `products` ADD `products_image_xl_1` VARCHAR(64) AFTER `products_image_sm_1`;

ALTER TABLE `products` ADD `products_image_sm_2` VARCHAR(64) AFTER `products_image_xl_1`;

ALTER TABLE `products` ADD `products_image_xl_2` VARCHAR(64) AFTER `products_image_sm_2`;

ALTER TABLE `products` ADD `products_image_sm_3` VARCHAR(64) AFTER `products_image_xl_2`;

ALTER TABLE `products` ADD `products_image_xl_3` VARCHAR(64) AFTER `products_image_sm_3`;

ALTER TABLE `products` ADD `products_image_sm_4` VARCHAR(64) AFTER `products_image_xl_3`;

ALTER TABLE `products` ADD `products_image_xl_4` VARCHAR(64) AFTER `products_image_sm_4`;

ALTER TABLE `products` ADD `products_image_sm_5` VARCHAR(64) AFTER `products_image_xl_4`;

ALTER TABLE `products` ADD `products_image_xl_5` VARCHAR(64) AFTER `products_image_sm_5`;

ALTER TABLE `products` ADD `products_image_sm_6` VARCHAR(64) AFTER `products_image_xl_5`;

ALTER TABLE `products` ADD `products_image_xl_6` VARCHAR(64) AFTER `products_image_sm_6`;

 

 

 

because the error means that u have missing tables at your sql database and these tables for the (UltraPics - MS2 Image Addon Pack) so all u need to do is to be sure that u uploaded the previous sql tables and that u had this part at the file (catalog/products_info.php)

 

//Product Tabs 2.0 Start

// BOF

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, pd.products_spec, pd.products_musthave, pd.products_extraimage, pd.products_manual, pd.products_extra1, pd.products_moreinfo, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

// EOF

//Product Tabs 2.0 End

 

check the file at the attached Product Tabs 2.1 ( Fixed and Full English Version Modified by Waleed Hagag )

 

the module is working perfect at my site www.a100100.com

you can check it

 

Hi thanks for the reply. I have just added the SQL I missed out (I thought that was for UltraPics - MS2 Image Addon Pack and checked for products_info.php and I have it in there. However I now have another error.

 

[b]Warning[/b]: include(includes/modules/product_listing_col.php) [[url="http://fragture.com/store/function.include"][color="#000000"]function.include[/color][/url]]: failed to open stream: No such file or directory in [b]/home/fragture/public_html/store/index.php[/b] on line [b]280[/b]

[b]Warning[/b]: include(includes/modules/product_listing_col.php) [[url="http://fragture.com/store/function.include"][color="#000000"]function.include[/color][/url]]: failed to open stream: No such file or directory in [b]/home/fragture/public_html/store/index.php[/b] on line [b]280[/b]

[b]Warning[/b]: include() [[url="http://fragture.com/store/function.include"][color="#000000"]function.include[/color][/url]]: Failed opening 'includes/modules/product_listing_col.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [b]/home/fragture/public_html/store/index.php[/b] on line [b]280[/b]

 

Any help will be appreciated. Thanks

Link to comment
Share on other sites

Hi thanks for the reply. I have just added the SQL I missed out (I thought that was for UltraPics - MS2 Image Addon Pack and checked for products_info.php and I have it in there. However I now have another error.

 

[b]Warning[/b]: include(includes/modules/product_listing_col.php) [[url="http://fragture.com/store/function.include"][color="#000000"]function.include[/color][/url]]: failed to open stream: No such file or directory in [b]/home/fragture/public_html/store/index.php[/b] on line [b]280[/b]<BR><BR>[b]Warning[/b]: include(includes/modules/product_listing_col.php) [[url="http://fragture.com/store/function.include"][color="#000000"]function.include[/color][/url]]: failed to open stream: No such file or directory in [b]/home/fragture/public_html/store/index.php[/b] on line [b]280[/b]<BR><BR>[b]Warning[/b]: include() [[url="http://fragture.com/store/function.include"][color="#000000"]function.include[/color][/url]]: Failed opening 'includes/modules/product_listing_col.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [b]/home/fragture/public_html/store/index.php[/b] on line [b]280[/b]

 

Any help will be appreciated. Thanks

 

Redid the installation and found out was user problem. Now everything seems good with 1 last error. Whenever I try to upload Product Image (Main Image used in

catalog & description page.) I get this fatal error:

<B>Fatal error</B>: Call to undefined function tep_output_generated_category_path_fs() in <B>/home/mysite/public_html/catalog/admin/categories.php</B> on line <B>555.</B>

I have tested the rest and everything is good. Please help this error. Thanks. Appreciate it. Cheers!

Edited by tecnicag
Link to comment
Share on other sites

I manage to solve this problem by removing this line in the attached admin/categories.php

 

Extra line

		 $products_image_name = tep_output_generated_category_path_fs($prod_path_id) . $products_image->filename;

 

Original from Product tabs' file

		   $products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);
	if ($products_image->parse() && $products_image->save()) {
	  $products_image_name = $products_image->filename;
	 $products_image_name = tep_output_generated_category_path_fs($prod_path_id) . $products_image->filename;
	} else {
	  $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');

 

 

Original from OSC file

	 $products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);
	if ($products_image->parse() && $products_image->save()) {
	  $products_image_name = $products_image->filename;
	} else {
	  $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');

 

I ain't sure if removing it will cause any issue as I am a total noob :( Anyway am glad problem is solved. Thanks for any inputs and hel:)

Link to comment
Share on other sites

  • 2 weeks later...

Good morning!

 

I added the products tab mod successfully this morning. I am having a hard time adjusting the width of it though:

http://www.zajanatural.com/product_info.php?products_id=752

 

And changing its colors. Not sure what to do to, hope someone can point me in the right direction.

Always grateful for any help received!!

Link to comment
Share on other sites

  • 4 weeks later...

hello, everybody, i can see that this forum has gone quiet but thought i would ask for help anyway as it refers to this contribution.

 

Ive added the add on successfully, but having one problem. the iframe contained within the "ask a question" tab, keeps loading/showing the index page "interative with my whole website" within the iframe, instead of what should be the ask a question form??!!

 

As i am pretty new to php so any help would be appreciated. I managed to fix the error messages that kept popping up when selecting categories but stuck on this one

Link to comment
Share on other sites

  • 4 weeks later...

I installed the Product Tabs 2.1 fixed contributuion by waleed hagag

All is fine in admin.

Product pages show fine.

Product new for the month showing fine.

 

****Catalog has a problem displaying catagories.****

 

Warning: include(includes/modules/product_listing_col.php) [function.include]: failed to open stream: No such file or directory in /home/cukdesns/public_html/compukraze/index.php on line 281

 

Warning: include(includes/modules/product_listing_col.php) [function.include]: failed to open stream: No such file or directory in /home/cukdesns/public_html/compukraze/index.php on line 281

 

Warning: include() [function.include]: Failed opening 'includes/modules/product_listing_col.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cukdesns/public_html/compukraze/index.php on line 281

 

When I remove the below code on line 281 the area of the page is blank.

<?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?>

Does anyone know of a fix?

I'm using STS but it even does it without it.

Any help is appreciated.

Link to comment
Share on other sites

Figured it out.

Solution:

catalog/includes/filenames.php

Changed:

define('FILENAME_PRODUCT_LISTING', 'product_listing_col.php');

To:

define('FILENAME_PRODUCT_LISTING', 'product_listing.php');

Catagories show fine now

Link to comment
Share on other sites

Hi. Having a small problem with Product Tabs. Everyrhting works fine in Firefox, but when viewed in IE only the 1st tab shows and when other tabs are selected they will not show

 

a link to a test site is here http://www.ciavash.com/test/buystone/produ...products_id=591

 

I would really appreciate some help, looked on forums for a similar problem but as yet failed to find one

 

Thanks

 

Mark

Link to comment
Share on other sites

  • 5 weeks later...
[...]

Ive added the add on successfully, but having one problem. the iframe contained within the "ask a question" tab, keeps loading/showing the index page "interative with my whole website" within the iframe, instead of what should be the ask a question form??!!

[...]

 

Good evening,

 

I am experiencing ecxactly the same problem both on my slightly modified main shop as well as on a total fresh install (still with the sample products).

Can somebody help me ?

 

hopeful greetings

Nala

Link to comment
Share on other sites

Good evening again,

 

I have found out one more thing that might help you.

The tab "ask a question" seems to have 2 different types of behaviour depending on the category.

It either loads the index page into the frame or it does not show the box at all - just the header part with the different tabs.

 

Here is the last bit of code of the admin/includes/modules/product_tab.php

 

<?php

if ($product_info['products_moreinfo'] > '') {

?>

<div id="MOREINFO" class="tabcontent">

<div style="font-size: 12px;font-weight: bold;

border-bottom: 1px dashed #999999;">

<?PHP echo TEXT_TAB_MOREINFO; ?>

</div>

<br>

<?php echo

stripslashes($product_info['products_moreinfo']); ?>

</div>

<?php

}

?>

 

 

<div id="ASKAQUESTION" class="tabcontent">

<div style="font-size: 12px;font-weight: bold;

border-bottom: 1px dashed #999999;">

<?PHP echo TEXT_TAB_ASKAQUESTION; ?>

</div>

<br>

<html>

<body>

<iframe style="width:100%;height:415;border:0px;overflow:auto;" src="ask_a_question.php?products_id=<?php echo $product_info['products_id']; ?>">

</iframe>

</body>

</html>

</div>

</td>

</tr>

</table>

</body>

 

Please - could somebody more experienced than me perhaps just give some hints where I shall start looking ?

 

Thanks

Nala

Link to comment
Share on other sites

hello, everybody, i can see that this forum has gone quiet but thought i would ask for help anyway as it refers to this contribution.

 

Ive added the add on successfully, but having one problem. the iframe contained within the "ask a question" tab, keeps loading/showing the index page "interative with my whole website" within the iframe, instead of what should be the ask a question form??!!

 

As i am pretty new to php so any help would be appreciated. I managed to fix the error messages that kept popping up when selecting categories but stuck on this one

 

Hi Donenvy,

 

I had the same error.

In my case it did only occur when I was on the page as guest. Once logged the error did not occur.

 

My mistake was not to allow guests to tell a friend in "My Store".

 

best regards

Nala

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
i was looking over the install instructions and saw this

 

 

 

what about the modded stores? who in the world has one with no modules :angry:

:lol: Not many I would guess, but then not many would have just the one add-on installed, either, so whatever you did when installing your second, third, fourth etc etc add-ons is what you need to do here. ie: get a utility that lets you compare code side by side (I use DiffMerge), and apply the code changes that come with this add-on, without affecting the code changes from previous add-ons.

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