Jump to content
Sign in to follow this  
spooks

Simple Multi Image Add-on Plus PrettyPhoto popups

Recommended Posts

Use with STS

 

 

I don't use STS, but as I understand it STS replaces the head section of the page, so you must add the code addition for the head to your STS templates, otherwise it will not exist on the rendered page.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hi all,

 

After installing the add-on I am gettting this error when trying to open Catalog in admin:

 

Parse error: syntax error, unexpected '<' in /home/vfshrvh/public_html/admin/categories.php on line 813

 

Does anyone know what the problem is?

 

Thanks a lot,

 

Lana

 

Also, there is no 'Dim background on popup' setting in admin->images.

Share this post


Link to post
Share on other sites

Hi all,

 

After installing the add-on I am gettting this error when trying to open Catalog in admin:

 

Parse error: syntax error, unexpected '<' in /home/vfshrvh/public_html/admin/categories.php on line 813

 

Does anyone know what the problem is?

 

Thanks a lot,

 

Lana

 

Also, there is no 'Dim background on popup' setting in admin->images.

 

 

You have made errors, check your edits esp near the error line

 

Did you apply the sql, were there any errors when u did, do you have the other settings?


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hi Sam,

 

I've checked, and rechecked, and searched for help before posting this and can't find a solution anywhere.

 

When i upload a pic to a product i get a page similar to the preview product page - except the spanish version is repeated dozens of times and as you scroll, the page just gets longer and you can't get to the bottom! It also crashed firefox.

 

I thought that your fix i've quoted help, but it did nothing for my problem, and i tripple checked i put it in correctly.

 

Q. When I edit a product & click on preview I get the message Warning: No file uploaded. repeated.

A. This is due to a bug in some versions of osC. In admin/includes/classes/upload.php line 69:

Find:

return $this->check_destination(); } else {

Replace with:

return $this->check_destination(); } elseif ($file['name'] <> '') {

 

 

Please Help!

 

barneybruce

Share this post


Link to post
Share on other sites

 

Clearly u have made errors, the osc bug fix u refer to is not related.

 

If u do this correct it will work, if it was broke then all would have your issue!!

 

Many often say they check many times so can't have gone wrong, yet they always have, they often manage to miss the same thing repeatedly.

 

Me-thinks reality is they exagerate what they did & rush what they do do thinking 'I can't have messed up' http://forums.oscommerce.com/index.php?showtopic=343384&st=0#entry1432157

 

 

 

Try using the supplied file & or use a file compare tool. smile.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Kanata,

 

I know the lightbox feature and drag feature and border are there, but I am not sure about dragging into Facebook or Twitter like your example. You may need to modify it some to do that. Perhaps Sam knows if it can be done or not.

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

Kanata,

 

I know the lightbox feature and drag feature and border are there, but I am not sure about dragging into Facebook or Twitter like your example. You may need to modify it some to do that. Perhaps Sam knows if it can be done or not.

 

 

Chris

 

The drag and drop feature i dont need it will be nice but not a pre.

 

I want the facebook style, the buttons the borders all :o.

Share this post


Link to post
Share on other sites

The drag and drop feature i dont need it will be nice but not a pre.

 

I want the facebook style, the buttons the borders all :o.

 

Hello Spooks? You know how?

Share this post


Link to post
Share on other sites

Hello Spooks? You know how?

 

 

It looks like you just need to set your css accordingly, I don't do that as any-one thats done html/css for a bit will know how, if you don't, there are sites to teach you, this is not the place for that. wink.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

hello, I am a newbie for OScommerce

I have installed simple multi image add on...

but when I click on admin, catalog...it show nothing..just a blank page...

when I click the products at online catelog...it said "product not found"

how do I fix this problems?

 

I have attached my script

 

admin/includes/language/english/categories

<?php
/*
 $Id: categories.php 1739 2007-12-20 00:52:16Z hpdl $

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

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

define('HEADING_TITLE', 'Categories / Products');
define('HEADING_TITLE_SEARCH', 'Search:');
define('HEADING_TITLE_GOTO', 'Go To:');

define('TABLE_HEADING_ID', 'ID');
define('TABLE_HEADING_CATEGORIES_PRODUCTS', 'Categories / Products');
define('TABLE_HEADING_ACTION', 'Action');
define('TABLE_HEADING_STATUS', 'Status');

define('TEXT_NEW_PRODUCT', 'New Product in "%s"');
define('TEXT_CATEGORIES', 'Categories:');
define('TEXT_SUBCATEGORIES', 'Subcategories:');
define('TEXT_PRODUCTS', 'Products:');
define('TEXT_PRODUCTS_PRICE_INFO', 'Price:');
define('TEXT_PRODUCTS_TAX_CLASS', 'Tax Class:');
define('TEXT_PRODUCTS_AVERAGE_RATING', 'Average Rating:');
define('TEXT_PRODUCTS_QUANTITY_INFO', 'Quantity:');
define('TEXT_DATE_ADDED', 'Date Added:');
define('TEXT_DATE_AVAILABLE', 'Date Available:');
define('TEXT_LAST_MODIFIED', 'Last Modified:');
define('TEXT_IMAGE_NONEXISTENT', 'IMAGE DOES NOT EXIST');
define('TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS', 'Please insert a new category or product in this level.');
define('TEXT_PRODUCT_MORE_INFORMATION', 'For more information, please visit this products <a href="http://%s" target="blank"><u>webpage</u></a>.');
define('TEXT_PRODUCT_DATE_ADDED', 'This product was added to our catalog on %s.');
define('TEXT_PRODUCT_DATE_AVAILABLE', 'This product will be in stock on %s.');

define('TEXT_EDIT_INTRO', 'Please make any necessary changes');
define('TEXT_EDIT_CATEGORIES_ID', 'Category ID:');
define('TEXT_EDIT_CATEGORIES_NAME', 'Category Name:');
define('TEXT_EDIT_CATEGORIES_IMAGE', 'Category Image:');
define('TEXT_EDIT_SORT_ORDER', 'Sort Order:');

define('TEXT_INFO_COPY_TO_INTRO', 'Please choose a new category you wish to copy this product to');
define('TEXT_INFO_CURRENT_CATEGORIES', 'Current Categories:');

define('TEXT_INFO_HEADING_NEW_CATEGORY', 'New Category');
define('TEXT_INFO_HEADING_EDIT_CATEGORY', 'Edit Category');
define('TEXT_INFO_HEADING_DELETE_CATEGORY', 'Delete Category');
define('TEXT_INFO_HEADING_MOVE_CATEGORY', 'Move Category');
define('TEXT_INFO_HEADING_DELETE_PRODUCT', 'Delete Product');
define('TEXT_INFO_HEADING_MOVE_PRODUCT', 'Move Product');
define('TEXT_INFO_HEADING_COPY_TO', 'Copy To');

define('TEXT_DELETE_CATEGORY_INTRO', 'Are you sure you want to delete this category?');
define('TEXT_DELETE_PRODUCT_INTRO', 'Are you sure you want to permanently delete this product?');

define('TEXT_DELETE_WARNING_CHILDS', '<b>WARNING:</b> There are %s (child-)categories still linked to this category!');
define('TEXT_DELETE_WARNING_PRODUCTS', '<b>WARNING:</b> There are %s products still linked to this category!');

define('TEXT_MOVE_PRODUCTS_INTRO', 'Please select which category you wish <b>%s</b> to reside in');
define('TEXT_MOVE_CATEGORIES_INTRO', 'Please select which category you wish <b>%s</b> to reside in');
define('TEXT_MOVE', 'Move <b>%s</b> to:');

define('TEXT_NEW_CATEGORY_INTRO', 'Please fill out the following information for the new category');
define('TEXT_CATEGORIES_NAME', 'Category Name:');
define('TEXT_CATEGORIES_IMAGE', 'Category Image:');
define('TEXT_SORT_ORDER', 'Sort Order:');

define('TEXT_PRODUCTS_STATUS', 'Products Status:');
define('TEXT_PRODUCTS_DATE_AVAILABLE', 'Date Available:');
define('TEXT_PRODUCT_AVAILABLE', 'In Stock');
define('TEXT_PRODUCT_NOT_AVAILABLE', 'Out of Stock');
define('TEXT_PRODUCTS_MANUFACTURER', 'Products Manufacturer:');
define('TEXT_PRODUCTS_NAME', 'Products Name:');
define('TEXT_PRODUCTS_DESCRIPTION', 'Products Description:');
define('TEXT_PRODUCTS_QUANTITY', 'Products Quantity:');
define('TEXT_PRODUCTS_MODEL', 'Products Model:');
define('TEXT_PRODUCTS_IMAGE', 'Products Image:');
define('TEXT_PRODUCTS_URL', 'Products URL:');
define('TEXT_PRODUCTS_URL_WITHOUT_HTTP', '<small>(without http://)</small>');
define('TEXT_PRODUCTS_PRICE_NET', 'Products Price (Net):');
define('TEXT_PRODUCTS_PRICE_GROSS', 'Products Price (Gross):');
define('TEXT_PRODUCTS_WEIGHT', 'Products Weight:');

define('EMPTY_CATEGORY', 'Empty Category');

define('TEXT_HOW_TO_COPY', 'Copy Method:');
define('TEXT_COPY_AS_LINK', 'Link product');
define('TEXT_COPY_AS_DUPLICATE', 'Duplicate product');

define('ERROR_CANNOT_LINK_TO_SAME_CATEGORY', 'Error: Can not link products in the same category.');
define('ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE', 'Error: Catalog images directory is not writeable: ' . DIR_FS_CATALOG_IMAGES);
define('ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST', 'Error: Catalog images directory does not exist: ' . DIR_FS_CATALOG_IMAGES);
define('ERROR_CANNOT_MOVE_CATEGORY_TO_PARENT', 'Error: Category cannot be moved into child category.');

//Select Product Image Directory & Instant Update For Products
define('TEXT_PRODUCTS_DIRECTORY_DONT_EXIST_1', 'ERROR ERROR - The provided \'images\' directory ');
define('TEXT_PRODUCTS_DIRECTORY_DONT_EXIST_2', ' does not exist on the server!!.');
define('TEXT_PRODUCTS_IMAGE_DIRECTORY', 'Image Directory:');
define('TEXT_PRODUCTS_IMAGE_ROOT_DIRECTORY', 'Root Directory');
define('TEXT_PRODUCTS_IMAGE_NEW_FOLDER', 'New Folder: ');
define('TEXT_PRODUCTS_UPDATE_PRODUCT', 'Update');
define('TEXT_PRODUCTS_INSERT_PRODUCT', 'Insert');
define('TEXT_PRODUCTS_WITHOUT_PREVIEW', ' without preview ');
//Select Product Image Directory & Instant Update For Products

?>

 

product_info.php

<?php
/*
 $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
// Simple multi image addon	
$image_group = TINY_IMAGE_GROUP_SIZE; //Number of images to show per row/column
$vertical_format = (ADDITIONAL_IMAGE_FORMAT == 'vertical');
$max_title_length = 40; //Set the maximm length of popup titles before they are broken into multiple lines.
// Simple multi image addon	section moved
	$products_image_array = unserialize($product_info['products_image_array']);
   if (!is_array($products_image_array)) $products_image_array = array();
// EOF Simple multi image addon

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
<!-- Simple multi image addon -->
<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.js"></script>
<script src="<?php echo DIR_WS_IMAGES ?>js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="<?php echo DIR_WS_IMAGES ?>js/prettyPhoto.css" type="text/css" media="screen">
<script type="text/javascript" charset="utf-8">

	$(document).ready(function(){
		$("a[rel^='prettyPhoto']").prettyPhoto({
			animationSpeed: 'normal', /* fast/slow/normal */
			padding: 30, /* padding for each side of the picture */
			opacity: <?php echo (BKG_LUMA/10); ?>, /* Value betwee 0 and 1 */
			showTitle: true, /* true/false */
			allowresize: true, /* true/false */
			counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
			hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
			modal: false, /* If set to true, only the close button will close the window */
			changepicturecallback: function(){}, /* Called everytime an item is shown/changed */
			callback: function(){} /* Called when prettyPhoto is closed */
		});
	});
</script>

<!-- EOF Simple multi image addon -->

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0"  cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top">

<table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table>

</td>
<!-- body_text //-->




   <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>



<? include('includes/innertableheader.php') ;?>


<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 // Simple multi image addon	
 if (!tep_db_num_rows($product_info_query)) {
// EOF Simple multi image addon
?>
     <tr>
       <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php
 } else {
   $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, 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 . "'");
   $product_info = tep_db_fetch_array($product_info_query);

   tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

   if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
     $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
   } else {
     $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
   }

   if (tep_not_null($product_info['products_model'])) {
     $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
   } else {
     $products_name = $product_info['products_name'];
   }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
           <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main">
<?php
   if (tep_not_null($product_info['products_image'])) {
?>
         <!-- Simple multi image addon -->
			 <div id="fancy">
			  <table border="0" cellspacing="0" cellpadding="2" align="right">
           <tr>
             <td align="center" class="smallText">

<?php if (strlen($product_info['products_name']) > $max_title_length) {  $title = wordwrap(htmlspecialchars($product_info['products_name']), $max_title_length, '<br>');
        } else { $title = htmlspecialchars($product_info['products_name']); } 
$m_source = ''; $thumb = (class_exists('oscthumb') && CFG_MASTER_SWITCH == 'On'); if ($thumb) { preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $product_info['products_image'],'','','','','',5), ENT_NOQUOTES), $image);  $m_source=str_replace('&','&',$image[1]); }
 echo '<a  rel="prettyPhoto[gallery1]" title="'.$title.'" href="' . ($m_source ? $m_source : DIR_WS_IMAGES . $product_info['products_image']) . '" alt="' . $product_info['products_name'] . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"', false, 5) . '</a><br />'; 
              if(!$vertical_format) { echo ''; $row = 1; reset($products_image_array); foreach($products_image_array as $value) { 
						 if ($thumb) {					 
						 $source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); 
						 } 
						 echo '<a  rel="prettyPhoto[gallery1]" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '</a>'; 

							++$row; if ($row > $image_group) { echo '<br />'; $row = 1; } } } 
							echo '</td>';
						 if($vertical_format) { echo '<td>'; $row = 1; reset($products_image_array); foreach($products_image_array as $value) { 
						 if ($thumb) {					 
						 $source = ''; preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $value,'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); 
						 } 
						 echo '<a  rel="prettyPhoto[gallery1]" title="'.$title.'" href="' . ($source ? $source : DIR_WS_IMAGES . $value) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br />' . '</a>'; 

								++$row; if ($row > $image_group) { echo '</td><td>'; $row = 1; } } echo '</td>'; } ?>


           </tr><?php  echo '<tr><td class="smallText">' . TEXT_CLICK_TO_ENLARGE . '</td></tr>'; ?>
         </table>
				</div>
				<!-- EOF Simple multi image addon -->
<?php
   }
?>
         <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
   $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>
         <table border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
           </tr>
<?php
     $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
     while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
       $products_options_array = array();
       $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
       while ($products_options = tep_db_fetch_array($products_options_query)) {
         $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
         if ($products_options['options_values_price'] != '0') {
           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
         }
       }

       if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
         $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
       } else {
         $selected_attribute = false;
       }
?>
           <tr>
             <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
             <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
           </tr>
<?php
     }
?>
         </table>
<?php
   }
?>
       </td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
   $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
   $reviews = tep_db_fetch_array($reviews_query);
   if ($reviews['count'] > 0) {
?>
     <tr>
       <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
   }

   if (tep_not_null($product_info['products_url'])) {
?>
     <tr>
       <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
   }

   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
     <tr>
       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
     </tr>
<?php
   } else {
?>
     <tr>
       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
     </tr>
<?php
   }
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
               <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td>
<?php
   if ((USE_CACHE == 'true') && empty($SID)) {
     echo tep_cache_also_purchased(3600);
   } else {
     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
   }
 }
?>
       </td>
     </tr>
   </table></form>



<? include('includes/innertablefooter.php') ;?>

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>


</td>







 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Edited by takiko

Share this post


Link to post
Share on other sites

I have some problem for installing this program...can anyone teach me how to fix it

 

when I click the catalog section @ admin...

it gone blank!? How can I fix it?

Share this post


Link to post
Share on other sites

Blank pages after intall

when I click the catalog section @ admin...

it gone blank!?

 

 

Blank pages are usually due to errors on a page with error display turned off.

Find in admin/includes/applicaion_top.php

// Turn off all error reporting

error_reporting(0);

replace with:

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

 

Failing that, check you error log in cPanel

 

 

Try using the supplied files in place of yours, you don't have to keep it that way, but it will show you that it works,

 

or try using a file compare tool if you have trouble with the manual method.

 

 

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Blank pages after intall

 

 

Blank pages are usually due to errors on a page with error display turned off.

Find in admin/includes/applicaion_top.php

// Turn off all error reporting

error_reporting(0);

replace with:

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

 

Failing that, check you error log in cPanel

 

 

Try using the supplied files in place of yours, you don't have to keep it that way, but it will show you that it works,

 

or try using a file compare tool if you have trouble with the manual method.

 

I fixed the problem, thanks

and there is "<< " this sign on my admin section...is it a bug!?

 

also, when I click on the image, isn't it pop-up doesn't work...

it just open a new window instead

Edited by takiko

Share this post


Link to post
Share on other sites

I fixed the problem, thanks

and there is "<< " this sign on my admin section...is it a bug!?

 

 

not a bug, an error in your file, but anyway, giving the odd character is meaningless, what context??

 

also, when I click on the image, isn't it pop-up doesn't work...

it just open a new window instead

 

 

read the faq to find your error.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

not a bug, an error in your file, but anyway, giving the odd character is meaningless, what context??

 

 

 

 

read the faq to find your error.

 

then, where can I find the error and fix it?

I checked, and I have uploaded js folder...I tried once was work, but it does not work again...no clue

Share this post


Link to post
Share on other sites

then, where can I find the error and fix it?

I checked, and I have uploaded js folder...I tried once was work, but it does not work again...no clue

 

 

No idea, you have the file & code & error message, if you give no info no-one can help!!whistling.gif

 

 

Read the faq again, go over the instal again see where you went wrong, read the whole doc, if your not prepared to make the effort, but just keep asking at every stage, you'll get no-where. wink.gif

 

please also read the tips given here smile.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

No idea, you have the file & code & error message, if you give no info no-one can help!!whistling.gif

 

 

Read the faq again, go over the instal again see where you went wrong, read the whole doc, if your not prepared to make the effort, but just keep asking at every stage, you'll get no-where. wink.gif

 

please also read the tips given here smile.gif

 

Thank You

I will re-install it again..and search the problems

Actually, I have changed the theme for my osc...maybe this is one of my error for the osc...

I have used the tree_theme,

 

here is my osc My OSC

 

I have re-installed several times, but the js-popup...seem sometime work, sometime not...

:'(

Share this post


Link to post
Share on other sites

Thank You

I will re-install it again..and search the problems

Actually, I have changed the theme for my osc...maybe this is one of my error for the osc...

I have used the tree_theme,

 

here is my osc My OSC

 

I have re-installed several times, but the js-popup...seem sometime work, sometime not...

:'(

 

I fixed the error on pop-up window...

but there are still an odd on my admin page, when I go to admin page..

there are "<" a sign on top left corner...

 

I tried go to "admin/include/application_top.php" and remove on of the sign...

but there is still one of it...

I checked all the files on admin, can't find the error :angry:

Share this post


Link to post
Share on other sites

I fixed the error on pop-up window...

but there are still an odd on my admin page, when I go to admin page..

there are "<" a sign on top left corner...

 

I tried go to "admin/include/application_top.php" and remove on of the sign...

but there is still one of it...

I checked all the files on admin, can't find the error mad.gif

 

 

you have an error some where in you code, likely php outside a php section.

 

but why do you think we can see your code? ohmy.gif how do u think we will know what u done wrong? rolleyes.gif

 

eg my radio don't work, whats wrong with it?, you must know as i told u it don't work!!! blink.gif


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

DO YOU HAVE A WEB PAGE WHERE I CAN SEE THIS BEING USED?

 

1WONDERFULDEALS@GMAIL.COM :-"

 

Simple Multi Image Add-on Plus PrettyPhoto

 

There are many multi image contributions, but I found many have become much too bloated or just didn't fit, so I created this, allowing as many extra product pictures as you want with

admin control and fancy lightbox like popups.

 

This is a different varient of my Simple Multi Image Add-on, the only difference to the previous is this uses PrettyPhoto for the popups in place of the Fancybox ones, which offers a different style & some options not available with Fancybox, but then missing some that Fancybox had, I leave it up to you to descide which you prefer.

 

This initial release is in a fairly rough form, fine tuning will come later

 

Features:

 

Its a simple strait forward design, only three files to edit

 

An un-limited number of additional images can be added to any product without modification.

 

Any product can have as many (or few) images as wanted.

 

Additional images can be deleted if needed.

 

PrettyPhoto is used for the image popups, so all product images can be browsed within a single popup.

 

Additional image layout can be modified in admin, selecting a horizontal or vertical layout and the number or images to show per row

 

Additional image size is also set in admin.

 

I recommend this is used with OscThumb for auto thumbnailing & faster load times.

 

As a bonus addition, a function is added in the product edit page to give a instant update option.

 

Images can be placed in subfolders of the images folder at product edit.

 

 

PrettyPhoto is released under the Creative Commons Attribution 2.5, details and examples can be found here .

 

 

 

Tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals off compatible.

Share this post


Link to post
Share on other sites

I am seeking a multi image plugin and it looks like this one will do it, but may I ask if I can combine this contribution with

http://addons.oscommerce.com/info/6855

 

As I like what it does to the way the product listings are displayed his demo site being http://www.development-server.net/catalog/index.php

 

And lastly can I add anything which will add a watermark to the images

 

Thanks Troy

Share this post


Link to post
Share on other sites

I am seeking a multi image plugin and it looks like this one will do it, but may I ask if I can combine this contribution with

http://addons.oscommerce.com/info/6855

 

As I like what it does to the way the product listings are displayed his demo site being http://www.developme...talog/index.php

 

And lastly can I add anything which will add a watermark to the images

 

Thanks Troy

 

 

Product listing & product display (product_info) are two seperate things listing links to product display, thats all.

 

Use osCThumb to add a watermark, this is compatible with that.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hi Spooks,

 

first let me say that I love this contribution. It was a super easy install that works great! Props to the folk at "no-margin-for-errors" also for their great work.

 

Now for what may be the dumb question. :-" As I stated it works great but I think I need to add some code somewhere else. If you go to product reviews on my site, click on a product to read a review, then that click-able thumb will only popup as the standard Oscommerce ones do. I tried adding the your javascript to the product_reviews_info.php, the popup_image.php, and the reviews.php, all to no avail. I did add the code to them individually and then removed , and relace it with the existing code when it didn't work for me. Any ideas on how to get this to work on the review popups?

 

Thanks,

David

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
Sign in to follow this  

×