Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 2 votes

Optional Related Products, Version 4.0


416 replies to this topic

#41 cicuta33

  • Community Member
  • 12 posts
  • Real Name:Emiliano Mart�nez Rivera
  • Gender:Male
  • Location:Barcelona, Spain

Posted 21 March 2007, 18:47

I tried uploading the modified product_info.php file but I've got an error:
Warning: main(includes/modules/FILENAME_RELATED_PRODUCTS) [function.main]: failed to open stream: No such file or directory in /usr/home/inesperpina/www/store/product_info.php on line 225

Warning: main() [function.include]: Failed opening 'includes/modules/FILENAME_RELATED_PRODUCTS' for inclusion (include_path='.:/usr/local/lib/php') in /usr/home/inesperpina/www/store/product_info.php on line 225

in the file line 225:
<?php include(DIR_WS_MODULES . FILENAME_RELATED_PRODUCTS); ?>


#42 cicuta33

  • Community Member
  • 12 posts
  • Real Name:Emiliano Mart�nez Rivera
  • Gender:Male
  • Location:Barcelona, Spain

Posted 21 March 2007, 18:59

sorry, sorry, sorry!!
I didn't have the right [catalog/]includes/filenames.php up there :sweating:
Now is working great!! :lol:

#43 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 21 March 2007, 19:06

View Postcicuta33, on Mar 21 2007, 10:39 AM, said:

Perfect!! :thumbsup: it worked out just fine entering the URL as you said but there was no 'require(DIR_WS_INCLUDES . 'column_left.php');' in the file.
This is an awesome tool you made, I'm sure this will be native in a later osCommerce version
I'm not quite sure how it works yet because it's got more options than I thougt :lol:
Emiliano,

I'm so glad you got it working. Though I have no idea why your install had problems in the navigation. I think I'd still like to see your catalog menu file. ([catalog\]admin\includes\boxes\catalog.php). I was expecting we'd need to look at it next, and I'm surprised we don't!

I guaranteed the 'require(DIR_WS_INCLUDES . 'column_left.php')' is in the utility. Without it, you won't see the left navigation. But if opening the file without commenting it out works, who cares!

To help you with all those options, I included a user's guide. In fact, there is an html version of the guide (complete with screenshots) on my website: Optional Related Products v.4.0 User's Guide

The time you take to familiarize yourself with the options, will likely be more than compensated for the time you save when you use the admin.

Have fun,
-Anita

#44 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 21 March 2007, 19:19

View Postcicuta33, on Mar 21 2007, 10:59 AM, said:

sorry, sorry, sorry!!
I didn't have the right [catalog/]includes/filenames.php up there :sweating:
Now is working great!! :lol:
You know what they say... The Devil's in the details. o:)

But then, they also say... All's well that ends well.

Cute stuff, by the way. If only I were 30 years younger. :rolleyes: And spoke enough Español to follow the checkout instructions... <sigh> You DO ship to the US, don't you?

-Anita

#45 cicuta33

  • Community Member
  • 12 posts
  • Real Name:Emiliano Mart�nez Rivera
  • Gender:Male
  • Location:Barcelona, Spain

Posted 21 March 2007, 20:01

View PostSkittles, on Mar 21 2007, 08:06 PM, said:

I think I'd still like to see your catalog menu file. ([catalog\]admin\includes\boxes\catalog.php). I was expecting we'd need to look at it next, and I'm surprised we don't!
Do you whant me to post it here?

View PostSkittles, on Mar 21 2007, 08:06 PM, said:

I guaranteed the 'require(DIR_WS_INCLUDES . 'column_left.php')' is in the utility. Without it, you won't see the left navigation. But if opening the file without commenting it out works, who cares!
I'm sure it is but I don't see it in the file you said (sql_setup_related_products.php)

View PostSkittles, on Mar 21 2007, 08:06 PM, said:

To help you with all those options, I included a user's guide. In fact, there is an html version of the guide (complete with screenshots) on my website: Optional Related Products v.4.0 User's Guide
Great, I'll check it out :thumbsup:

View PostSkittles, on Mar 21 2007, 08:19 PM, said:

Cute stuff, by the way. If only I were 30 years younger. rolleyes.gif And spoke enough Español to follow the checkout instructions... <sigh> You DO ship to the US, don't you?
Thanks, that's my wife that designs and makes with her own hands :wub: , the store is in English and Spanish but I changed the typical flags for abreviations and yes, we do ship tu the US

Thanks againg for all the help Anita, you're the best ;)
I hope to see that you decide to make your self a nice present from our store :P

#46 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 21 March 2007, 21:30

View Postcicuta33, on Mar 21 2007, 12:01 PM, said:

Do you want me to post it here?
Yes. I'd like to take a look at it.

Also, do you have other contributions on the site? I'd like to figure out what caused the error. If it has to do with blending two or more contributions, it would be good to include information in a troubleshooting guide.

And if there is a mistake in the file, I would think you'd want to fix that before it interferes with any other contributions you'd like to add.

Your wife must be a talented seamstress to create such beautiful lingerie. So much detail work! I know a bit about sewing, so I know she's put a lot of work into her products. I'll bookmark the site, and when my diet and exercise get me back into a size 10, I'll be sure and buy myself a treat from her site! A much better way to celebrate than, say, a chili burger. (Which would be my husband's first choice!) (w00t)

Here's to prosperity!
-Anita

#47 megbr

  • Community Member
  • 25 posts
  • Real Name:margarete

Posted 22 March 2007, 01:20

Hi Anita,

Good job, for days I've been searching for a contribution like ORP and everything that I found I didn't have courage to put in my website. I went through the installation with just a few mistakes from my part. Everything looks good until I install the new SQL table, then the page of my products becomes a big mess and I cannot see the suggested products. My website is modified and I can display three different images for my products. I'll try to include here two screenshots that I made (sorry if they don't show up, this is my first time doing this), the regular page and then the page after I applied the SQL table. If you have any clues to give me I really appreciate.
Thank you very much
Margaret

[img]http://www.allureart.com/images/shot1.JPG[/img]


[img]http://www.allureart.com/images/shot2.JPG[/img]

#48 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 22 March 2007, 02:48

View Postmegbr, on Mar 21 2007, 05:20 PM, said:

Hi Anita,

Good job, for days I've been searching for a contribution like ORP and everything that I found I didn't have courage to put in my website. I went through the installation with just a few mistakes from my part. Everything looks good until I install the new SQL table, then the page of my products becomes a big mess and I cannot see the suggested products. My website is modified and I can display three different images for my products. I'll try to include here two screenshots that I made (sorry if they don't show up, this is my first time doing this), the regular page and then the page after I applied the SQL table. If you have any clues to give me I really appreciate.
Thank you very much
Margaret
Margaret,

Checking out a product page, I see 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 'RELATED_PRODUCTS_MAX_DISP' at line 14

SELECT pop_products_id_slave, products_name, products_model, products_price, products_quantity, products_tax_class_id, products_image FROM products_related_products, products_description pa, products pb WHERE pop_products_id_slave = pa.products_id AND pa.products_id = pb.products_id AND language_id = '1' AND pop_products_id_master = '319' AND products_status='1' ORDER BY rand() limit RELATED_PRODUCTS_MAX_DISP

If 'RELATED_PRODUCTS_MAX_DISP' were defined, even with an empty string, or null, you wouldn't be seeing the constant name. Makes me think there is a problem with the configuration key.

The first thing I would do is open the Admin Configuration->Related Products and check for the options. You should see:
		Display Thumbnail Images
		Display Product Name
		Display Product Model
		Display Price
		Display Quantity Available
		Display Buy Now Button
		Split Display Into Rows
		Define Number of Items Per Row
		Define Number of Items to Display
		Use Random Display Order
		Admin Display: Maximum Rows
		Admin Display: Drop-Down List Maximum Length
		Admin Display: Display List Maximum Length
		Admin Display: Use Product Model
		Admin Display: Use Product Name
		Admin Display: Combine Model and Name separator
		Admin Function: Use Delete Confirmation
		Admin Function: Combine Insert with Inherit

If these are missing, or if you don't see Related Products listed under the Configuration menu in the Admin, the problem is with the configuration_group and configuration table entries.

Check this and get back to me. Then we'll figure out what to do next.

-Anita

P.S. While we're working on this, if you'd like, you can comment out the include statement in product_info.php and your live site won't see the error messages.

#49 megbr

  • Community Member
  • 25 posts
  • Real Name:margarete

Posted 22 March 2007, 04:02

View PostSkittles, on Mar 22 2007, 02:48 AM, said:

Margaret,


The first thing I would do is open the Admin Configuration->Related Products and check for the options. You should see:
		Display Thumbnail Images<BR>		Display Product Name<BR>		Display Product Model<BR>		Display Price<BR>		Display Quantity Available<BR>		Display Buy Now Button<BR>		Split Display Into Rows<BR>		Define Number of Items Per Row<BR>		Define Number of Items to Display<BR>		Use Random Display Order<BR>		Admin Display: Maximum Rows<BR>		Admin Display: Drop-Down List Maximum Length<BR>		Admin Display: Display List Maximum Length<BR>		Admin Display: Use Product Model<BR>		Admin Display: Use Product Name<BR>		Admin Display: Combine Model and Name separator<BR>		Admin Function: Use Delete Confirmation<BR>		Admin Function: Combine Insert with Inherit

If these are missing, or if you don't see Related Products listed under the Configuration menu in the Admin, the problem is with the configuration_group and configuration table entries.

Check this and get back to me. Then we'll figure out what to do next.

-Anita

P.S. While we're working on this, if you'd like, you can comment out the include statement in product_info.php and your live site won't see the error messages.

I had uninstalled the contribution but I installed again to check this and I can see Related Products under Configuration in my Admin and the options are all there. I also changed the product_info.php as you suggested but if you go to my store (www.allureart.com) you can see that the index page looks normal but if you click in any product then everything changes.

Thanks for your help.
Margaret

#50 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 22 March 2007, 07:35

View Postmegbr, on Mar 21 2007, 08:02 PM, said:

I had uninstalled the contribution but I installed again to check this and I can see Related Products under Configuration in my Admin and the options are all there. I also changed the product_info.php as you suggested but if you go to my store (www.allureart.com) you can see that the index page looks normal but if you click in any product then everything changes.

Thanks for your help.
Margaret
Margaret,

I'm stumped.

I don't see how the changes to the database could affect the layout of your page like that. There must be some conflict between this contribution and and one of the other contributions you already have installed. But without access to the files and the database, I can't do any more tonight.

I would be interested in knowing what contributions (and which versions) you have installed, so I can download the files and look for potential conflicts. And if you'd like, I'm willing to look over the files that need to be modified for this mod; look for any places where this contribution and another need to modify the same lines of code.

When you uninstalled this contribution before, did you remove the code from the files, as well as run the sql uninstall? Or just run the uninstall from the sql utility? (The error I was receiving after you uninstalled would suggest the include statement was still in product_info.php)

It may take a couple of days, what with posting back and forth, but I'm willing to help you make this work with your site.

Time to call it a day. Talk to you tomorrow.
-Anita

#51 cicuta33

  • Community Member
  • 12 posts
  • Real Name:Emiliano Mart�nez Rivera
  • Gender:Male
  • Location:Barcelona, Spain

Posted 22 March 2007, 09:32

View PostSkittles, on Mar 21 2007, 10:30 PM, said:

Yes. I'd like to take a look at it.

Also, do you have other contributions on the site? I'd like to figure out what caused the error. If it has to do with blending two or more contributions, it would be good to include information in a troubleshooting guide.

And if there is a mistake in the file, I would think you'd want to fix that before it interferes with any other contributions you'd like to add.

Your wife must be a talented seamstress to create such beautiful lingerie. So much detail work! I know a bit about sewing, so I know she's put a lot of work into her products. I'll bookmark the site, and when my diet and exercise get me back into a size 10, I'll be sure and buy myself a treat from her site! A much better way to celebrate than, say, a chili burger. (Which would be my husband's first choice!) (w00t)

Here's to prosperity!
-Anita

No chili burgers for you then! ;)
<?php
/*
  $Id: catalog.php,v 1.21 2003/07/09 01:18:53 hpdl Exp $

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

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License
*/
?>
<!-- catalog //-->
		  <tr>
			<td>
<?php
  $heading = array();
  $contents = array();

  $heading[] = array('text'  => BOX_HEADING_CATALOG,
					 'link'  => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'));

  if ($selected_box == 'catalog') {
	$contents[] = array('text'  => '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>'.
		/* Optional Related Products (ORP) */
		'<a href="' . tep_href_link(FILENAME_RELATED_PRODUCTS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_RELATED_PRODUCTS . '</a>');
		//ORP:end
		/* Optional Related Products (ORP) */
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_master = '" . (int)$product_id . "'");
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_slave = '" . (int)$product_id . "'");
		//ORP: end
  }

  $box = new box;
  echo $box->menuBox($heading, $contents);
?>
			</td>
		  </tr>
<!-- catalog_eof //-->
The only contribution that may have to do with this is option_type_feature_v1.71
The other are shipping and payment modules such as CORREOS_P_AZUL, payment_modules_3.0, SEUR EuroPack, SEUR nacional, Ship_Spain_Paqueteria_Urgente
Later I want to install tinymce_2_0_8, extra_images_v1-5 or more_pics_6_v2_1_2 and one I thought I down loaded but can't find it now that it's for leting people subscribe to the newsletter w/o registering

(taste the raindow ;) )

#52 cicuta33

  • Community Member
  • 12 posts
  • Real Name:Emiliano Mart�nez Rivera
  • Gender:Male
  • Location:Barcelona, Spain

Posted 22 March 2007, 09:35

Awesome skin Margaret, great job :D

#53 megbr

  • Community Member
  • 25 posts
  • Real Name:margarete

Posted 22 March 2007, 12:43

View PostSkittles, on Mar 22 2007, 07:35 AM, said:

Margaret,

I'm stumped.

I don't see how the changes to the database could affect the layout of your page like that. There must be some conflict between this contribution and and one of the other contributions you already have installed. But without access to the files and the database, I can't do any more tonight.

I would be interested in knowing what contributions (and which versions) you have installed, so I can download the files and look for potential conflicts. And if you'd like, I'm willing to look over the files that need to be modified for this mod; look for any places where this contribution and another need to modify the same lines of code.

When you uninstalled this contribution before, did you remove the code from the files, as well as run the sql uninstall? Or just run the uninstall from the sql utility? (The error I was receiving after you uninstalled would suggest the include statement was still in product_info.php)

It may take a couple of days, what with posting back and forth, but I'm willing to help you make this work with your site.

Time to call it a day. Talk to you tomorrow.
-Anita

I have to check the versions for the contributions that are installed but just to give you an idea: sitemonitor, supertracker, linkpoint api, upsxml, ccgv trad (uninstalled but I still have some stuff of it around) and the one that enables more than one image I have to check the name, because I paid a programmer to install it.

When I uninstalled I just run the sql uninstall from the utility then I checked my website and everything was normal, so I didn't remove the code from the pages.

Today and tomorrow I have to go to work so I just can check back late. I appreciate yr help, thanks a lot.

Margaret

#54 megbr

  • Community Member
  • 25 posts
  • Real Name:margarete

Posted 22 March 2007, 12:47

View Postcicuta33, on Mar 22 2007, 09:35 AM, said:

Awesome skin Margaret, great job :D


Thanks, I bought the template and then I changed (the hardest work I've done in my life) a little bit.

#55 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 22 March 2007, 17:40

View Postcicuta33, on Mar 22 2007, 01:32 AM, said:

No chili burgers for you then! ;)

The only contribution that may have to do with this is option_type_feature_v1.71
The other are shipping and payment modules such as CORREOS_P_AZUL, payment_modules_3.0, SEUR EuroPack, SEUR nacional, Ship_Spain_Paqueteria_Urgente
Later I want to install tinymce_2_0_8, extra_images_v1-5 or more_pics_6_v2_1_2 and one I thought I down loaded but can't find it now that it's for leting people subscribe to the newsletter w/o registering

(taste the raindow ;) )
Emiliano,

Okay. I found the problem.

  if ($selected_box == 'catalog') {
	$contents[] = array('text'  => '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .
								   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>'.
		/* Optional Related Products (ORP) */
		'<a href="' . tep_href_link(FILENAME_RELATED_PRODUCTS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_RELATED_PRODUCTS . '</a>');
		//ORP:end
		/* Optional Related Products (ORP) */
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_master = '" . (int)$product_id . "'");
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_slave = '" . (int)$product_id . "'");
		//ORP: end
  }

There is code in this file that should be in categories.php:

Remove these lines from the catalog.php file:
		/* Optional Related Products (ORP) */
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_master = '" . (int)$product_id . "'");
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_slave = '" . (int)$product_id . "'");
		//ORP: end
Then double-check and make sure you completed Step 2 for a new install:

2) Add code to [catalog/]admin/categories.php, case 'delete_product_confirm':
   to remove all Related Product entries containing the removed product.
   Find, on or around line 154:
		  if ($product_categories['total'] == '0') {
			tep_remove_product($product_id);
		  }
		}

   Replace with:
		  if ($product_categories['total'] == '0') {
			tep_remove_product($product_id);
		  }
		/* Optional Related Products (ORP) */
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_master = '" . (int)$product_id . "'");
		  tep_db_query("delete from " . TABLE_PRODUCTS_RELATED_PRODUCTS . " where pop_products_id_slave = '" . (int)$product_id . "'");
		//ORP: end
		}

Adding this code to the categories.php file causes the program to delete any records for a specific product if and when you delete that product. It has the potential of saving you a ton of work if your products change regularly (which is probably a real concern for your wife's site.)

By the way, don't use that subscription contribution. It's very poorly written, full of bugs, and doesn't handle the sql properly leaving your site wide open to sql injection attacks! (I read every page of the support thread. Scary stuff.) I've spent the past two weeks rewriting it from the ground up to use it on a client's site. When I'm finished, I'll let you know. (Could be another two weeks or more, the way things are going...) You will still need to find a good newsletter contribution, though, because I'm only rewriting the Subscription end of it. I'll be releasing it under a different name, too, as it will be a completely different contribution!

-Anita

#56 cicuta33

  • Community Member
  • 12 posts
  • Real Name:Emiliano Mart�nez Rivera
  • Gender:Male
  • Location:Barcelona, Spain

Posted 22 March 2007, 18:36

View PostSkittles, on Mar 22 2007, 06:40 PM, said:

By the way, don't use that subscription contribution. It's very poorly written, full of bugs, and doesn't handle the sql properly leaving your site wide open to sql injection attacks! (I read every page of the support thread. Scary stuff.) I've spent the past two weeks rewriting it from the ground up to use it on a client's site. When I'm finished, I'll let you know. (Could be another two weeks or more, the way things are going...) You will still need to find a good newsletter contribution, though, because I'm only rewriting the Subscription end of it. I'll be releasing it under a different name, too, as it will be a completely different contribution!

I had the categories file ok, I don't know how I came up with that code at catalog file. Sorry about that :blush:
Are you talking about 'Newsletter & Subscribers' I don't need it right now, as a matter of fact my wife prefers to send mails from her mail client. Thanks for the advise, a was trying to convice her... ^_^

#57 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 22 March 2007, 19:21

View Postcicuta33, on Mar 22 2007, 10:36 AM, said:

I had the categories file ok, I don't know how I came up with that code at catalog file. Sorry about that :blush:
Are you talking about 'Newsletter & Subscribers' I don't need it right now, as a matter of fact my wife prefers to send mails from her mail client. Thanks for the advise, a was trying to convice her... ^_^
Don't worry about it. The only thing that's important is we found it and removed it.

I tried to make this contribution as easy to install as possible. But with almost any contribution, there are so many little changes here and there, it is really easy to skip a step or put code in the wrong file, or the wrong place in a file. It's the nature of the beast. That's why we have support threads in the forum. :)

And yes, I am talking about 'Newsletter & Subscribers'.

The premise is good. If someone likes the site and what you have to offer but aren't ready to make a purchase, they 'might' bookmark your site. They aren't going to create an account, though, just to get a newsletter. But if you can get them to sign up for your newsletter with just their name and email address, you can keep your products and your site on their mind with regular mailings. And they may eventually become regular customers.

The problem is in the execution of the premise. I don't want to disrespect the original contributor. However, there are a multitude of problems with the contribution, many people on the support thread just gave up trying to get it to work, and several posters pointed out the SQL injection attack vulnerability.

And from what I can tell, your wife probably has a lot more control over the look of her emails from her current email client than from the Admin of osCommerce, regardless of which Newsletter contribution you use...

Anyway, I'll PM you when the new contribution is ready.

Take care,
-Anita

#58 Skittles

  • Community Member
  • 353 posts
  • Real Name:Anita Cross
  • Gender:Female
  • Location:Oregon

Posted 22 March 2007, 19:42

View Postmegbr, on Mar 22 2007, 04:43 AM, said:

I have to check the versions for the contributions that are installed but just to give you an idea: sitemonitor, supertracker, linkpoint api, upsxml, ccgv trad (uninstalled but I still have some stuff of it around) and the one that enables more than one image I have to check the name, because I paid a programmer to install it.

When I uninstalled I just run the sql uninstall from the utility then I checked my website and everything was normal, so I didn't remove the code from the pages.

Today and tomorrow I have to go to work so I just can check back late. I appreciate yr help, thanks a lot.

Margaret
Margaret,

At your earliest convenience, run the sql utility to uninstall the sql stuff. That way, your site can look right while we figure this out.

Let me know when you are back from work. In the meantime, I'll checkout the contributions you listed.

-Anita

#59 megbr

  • Community Member
  • 25 posts
  • Real Name:margarete

Posted 23 March 2007, 02:02

Well, maybe too late but I'm back from work. I'll check all the contirbutions that I have.

#60 megbr

  • Community Member
  • 25 posts
  • Real Name:margarete

Posted 23 March 2007, 03:03

Hi Anita,

This is a copy of my catalog/product_info.php before I changed. When I was in the step 9 making the changes for new install I found the code that needed to be changed but it was like unavailable as you can see below, so I added the new code and removed the /* and */. Maybe is here the problem?

Margarete


<?php

/*

$Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $



osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com



Copyright © 2003 osCommerce



Released under the GNU General Public License

*/



require('includes/application_top.php');



require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);



$product_check_query = tep_db_query("select count(*) as total 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_check = tep_db_fetch_array($product_check_query);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<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=yes,re
sizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,l
eft=150')

}

//--></script>
<script language="javascript"><!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//--></script>

</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" width="100%" cellspacing="0" cellpadding="0">

<tr>

<!-- 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')); ?>



<table cellspacing=0 cellpadding=0 width=100%><tr><td align=left>















<?php

if ($product_check['total'] < 1) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

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

</table>

<?php

} else {

//BOF UltraPics
//BOF Original
/*
$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 . "'");
*/
//EOF Original
$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, 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 UltraPics

$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 pr_price style="color:#777777; font-size:11px">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s>&nbsp;<span class=ch8>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

} else {

$products_price ='<span pr_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'];

}

?>

<table cellspacing=0 cellpadding=0>

<tr><td width=485 valign=top>

<table width="485" cellpadding=0 cellspacing=0>

<tr><td width="490"><img src=images/m27.gif width=490 height=8></td>
</tr>

<tr><td class=ch8 valign=top>

<table width="485" cellpadding=0 cellspacing=0>

<tr><td height=8></td></tr>

<tr><td class=ml5 style="padding-left: 7px"><?=$products_name?></td></tr>

<tr><td height=8></td></tr>

<tr><td COLSPAN=2 style="padding-left: 5px">

<table width=470 height="1" cellpadding=0 cellspacing=0>

<tr><td bgcolor=#A6C279 height=1></td></tr>
</table>

</td></tr>

<tr valign="middle"><td width="60%" align="left">









<!-- display image -->

<?php

if (tep_not_null($product_info['products_image'])) {

?>

<table cellspacing="0" cellpadding="0" align="left" width="100%">

<tr valign="middle">

<td align="center" class="smallText" width="100%">

<!--BOF UltraPics-->
<?php
if ($product_info['products_image_med']!='') {
$new_image = $product_info['products_image_med'];
$image_width = MEDIUM_IMAGE_WIDTH;
$image_height = MEDIUM_IMAGE_HEIGHT;
} else {
$new_image = $product_info['products_image'];
$image_width = LARGE_IMAGE_WIDTH;
$image_height = LARGE_IMAGE_HEIGHT;
}

?>
<!--EOF UltraPics-->

<script language="javascript"><!--

//BOF UltraPics
//BOF Original
/*
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="5" vspace="5" name="Image" align="middle"' ) . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
*/
//EOF Original
document.write('<?php echo tep_image(DIR_WS_IMAGES . $new_image, addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5" name="Image" align="left"'); ?>');
//EOF UltraPics

//--></script>

<noscript>

<!--BOF UltraPics-->
<!--BOF Original--><!--
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, 'hspace="5" vspace="5" name="Image" align="middle"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
--><!--EOF Original-->
<?php echo tep_image(DIR_WS_IMAGES . $new_image . '&image=0', addslashes($product_info['products_name']), $image_width, $image_height, 'hspace="5" vspace="5" name="Image" align="left"'); ?>
<!--EOF UltraPics-->
</noscript> </td>
</tr>
</table>

<?php

}

?>

<!--end display image -->



</td>
<td width="20%" align="left">
<table width=100% cellspacing="0" cellpadding="0" align="left">

<!--BOF UltraPics-->
<?php
if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') {
include(DIR_WS_MODULES . 'additional_images.php');
}
?>
<!--EOF UltraPics-->
</table>
</td>

</tr>

<tr>

















<td width=282 valign=top>

<table width="336" border=0 cellpadding=0 cellspacing=0 style="padding-left:9px">

<!--<tr><td height=6></td></tr>-->

<!--<tr><td height=12></td></tr>-->

<tr><td width=300 valign=top>

<table cellspacing=2 cellpadding=2>

<!--<<tr><td class=ml6>

<?

if ($product_info['products_date_available'] > date('Y-m-d H:i:s'))

echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available']));

else

//echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added']));

?>



</td></tr>-->

<!--<tr><td height=4></td></tr> -->

<!--<tr><td><a style="text-decoration:underline" class=pr_descr href=<?=tep_href_link(FILENAME_TELL_A_FRIEND, tep_get_all_get_params())?>>Tell a Friend</a></td></tr>-->



<!--<tr><td height=16></td></tr> -->

<tr><td class=ch10>only: <?=$products_price?></td></tr>

<tr><td height=10></td></tr>
</table>

</td></tr>

<tr><td colspan=2 style="padding-left: 13px"><a href=<?=tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS)?></a><span style="padding-left: 5px"></span><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_BUY_NOW); ?></td></tr>

<tr><td height=8></td></tr>
</table> </td></tr>

<tr><td height=20></td></tr>

<tr><td colspan=3 align=center>

<table cellspacing=0 cellpadding=0 width=484>

<tr><td style="padding-left:7px">

<?php echo stripslashes($product_info['products_description']); ?>

</td></tr>

<tr><td style="padding-left:7px" height=17></td></tr>
</table>

</td></tr>

<tr><td height=2></td></tr>
</table>

</td></tr>

<tr><td><img src=images/m28.gif width=490 height=7></td></tr>
</table>

</td>
</tr>
</table>









<!----------------------- Not editable part -------------------------------->



<tr><td>



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

}



?>

<!--

<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></td>

<!-- body_text_eof //-->

</tr>

</table>

<!-- body_eof //-->



<!-- footer //-->

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

<!-- footer_eof //-->

</body>

</html>

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