Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding the wishlist


Guest

Recommended Posts

Posted

I'm not sure what I'm looking at to correct this error....

 

 

Warning: Division by zero in /mnt/web_g/d47/s36/b01f2394/www/store/nfoscomm/catalog/includes/classes/split_page_results.php on line 59

1064 - You have an error in your SQL syntax near 'MAX_DISPLAY_WISHLIST_PRODUCTS' at line 1

 

select * from customers_wishlist where customers_id = '4' order by products_name limit 0, MAX_DISPLAY_WISHLIST_PRODUCTS

 

[TEP STOP]

 

If you need more information, please let me know and I'll post whatever is needed.

Posted

I could be way off, but since this contrib makes no changes to that class file, it is a matter of a call being made to that class.

 

With that thought in mind, double check your work on this step of Wishlist's installation instructions:

6. add to /catalog/includes/configure.php the following lines:

 

  define('MAX_DISPLAY_WISHLIST_PRODUCTS', '10'); // How many wishlist items to show per page on the main wishlist.php file

  define('MAX_DISPLAY_WISHLIST_BOX', '6'); // How many wishlist items to display in the infobox before it changes to a counter

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted

if (strpos($this->sql_query, 'distinct') || strpos($this->sql_query, 'group by')) {
       $count_string = 'distinct ' . tep_db_input($count_key);
     } else {
       $count_string = tep_db_input($count_key);
     }

     $count_query = tep_db_query("select count(" . $count_string . ") as total " . substr($this->sql_query, $pos_from, ($pos_to - $pos_from)));
     $count = tep_db_fetch_array($count_query);

     $this->number_of_rows = $count['total'];

     $this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);

     if ($this->current_page_number > $this->number_of_pages) {
       $this->current_page_number = $this->number_of_pages;
     }

     $offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));

     $this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;
   }

 

Sorry, I thought I had included it! Feeling kinda stupid! LOL :blink:

 

The above lines are from 48 to 68 & line 59 starts with

$this->number_of_pages = ceil($this->number_of_rows / $this->number_of_rows_per_page);

 

As well, I'm not sure if the sql error is directly related to the line 59 error...

Posted
I could be way off, but since this contrib makes no changes to that class file, it is a matter of a call being made to that class.

 

With that thought in mind, double check your work on this step of Wishlist's installation instructions:

6. add to /catalog/includes/configure.php the following lines:

 

? define('MAX_DISPLAY_WISHLIST_PRODUCTS', '10'); // How many wishlist items to show per page on the main wishlist.php file

? define('MAX_DISPLAY_WISHLIST_BOX', '6'); // How many wishlist items to display in the infobox before it changes to a counter

what would I be looking for exactly?

Posted
what would I be looking for exactly?

 

Specifically that the step was done. Sounds too simple, but I have done it before (left out a step).

 

And that the lines were added to:

 

catalog/inlcudes/configure.php

 

and not

 

catalog/admin/includes/configure.php

 

If it was done and is in the right file, make sure it is exactly right. Sometimes best to just fall back to the pre-install backup copy of that file and redo that step.

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted
what would I be looking for exactly?

 

Specifically that the step was done. Sounds too simple, but I have done it before (left out a step).

 

And that the lines were added to:

 

catalog/inlcudes/configure.php

 

and not

 

catalog/admin/includes/configure.php

 

If it was done and is in the right file, make sure it is exactly right. Sometimes best to just fall back to the pre-install backup copy of that file and redo that step.

I've looked at this file 5 times & the added lines aren't being uploaded properly onto the server... Can't figure it out....

Posted

What are you using to upload them?

 

Do you have command line access? For example SSH or telnet?

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted
What are you using to upload them?

 

Do you have command line access? For example SSH or telnet?

I'm using an ftp loader... Filezilla... this is the firts time I've modified something that doesn't save.

 

I use crimson editor as my php editor... As for your other question, I'm not sure what you mean....

Posted

Command line (aka shell) access via SSH or telnet (preferably SSH for security reasons) allows you run commands directly in the Linux shell. I do most of my file editing on the server. That's not to say it is better, its just my way.

 

Failure of a file to save sounds like permissions problems to me. When you upload, are there any error messages in the status text part of the screen (I believe it is the top pane in Filezilla?

 

You may need to ask your hosting provider to look into why the files aren't saving.

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted

There are no errors that are being generated... SO I'll call my provider and let you know!

 

I just went manually into the file off the server via the admin panel & I'm getting a permission error...

Posted

Woohoo, all fixed... it was a permission error! Everything is working perfectly now!

 

Thanks for the help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...