Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Added a contrib, now my site won't load


cmbyrne

Recommended Posts

i tried adding the loginbox best contribution and get this error on my page:

Parse error: parse error, unexpected $ in /hsphere/local/home/cmbyrne/mtgo.byrnesccgshop.com/catalog/includes/functions/general.php on line 1252

 

 

i took out everything from the contrib, and still get this error!

please help

Link to comment
Share on other sites

Replace catalog/includes/functions/general.php with a known good copy.  The file in question probably has a missing }

 

Matti

 

nevermind :)

 

i just checked and it seems i had deleted one of those ({) and that's what the problem was.

 

I thought i was going to die of a heart attack after all the work put into the site.

 

Thanks so much!

Christina

Link to comment
Share on other sites

uuuggghh

 

i just went to a few different pages and i must have messed something else up.

 

If i click on a category the "new products for december" items don't show up. The header for the box does, but the rest of the box doesnt.

 

That box shows up fine on the homepage though, just not if i view any of my categories.

Link to comment
Share on other sites

anyone?

 

If you need to see what i am talking about, my site is here.

 

you can see on the home page the "new products for december" shows up fine.

 

Click on the category "non-foil singles" and only the header for that box shows, and i've just now noticed that the best sellers box doesn't show either.

 

Then if you click on either "uncommons" or "commons" they both come back (rares doesn't have any items yet).

 

The case is the same with the category "foil singles", only the header shows, and the best seller's box doesn't show.

 

 

Any ideas? hints? suggestions? I am just completely bewildered here.

 

If you need to see the code to any of my files, just say the word and i will post them!!!

 

Christina

 

*one more thing. When you do a backup in admin, what on earth are you backing up? i did a restore and it didn't restore this whole mess :/

Link to comment
Share on other sites

anyone?

 

If you need to see what i am talking about, my site is here.

 

you can see on the home page the "new products for december" shows up fine.

 

Click on the category "non-foil singles" and only the header for that box shows, and i've just now noticed that the best sellers box doesn't show either.

 

Then if you click on either "uncommons" or "commons" they both come back (rares doesn't have any items yet).

 

The case is the same with the category "foil singles", only the header shows, and the best seller's box doesn't show.

Any ideas? hints? suggestions? I am just completely bewildered here.

 

If you need to see the code to any of my files, just say the word and i will post them!!!

 

Christina

 

*one more thing. When you do a backup in admin, what on earth are you backing up? i did a restore and it didn't restore this whole mess :/

 

 

the new_products module is category sensitive.

on the main page it displays new products from everywhere but in a category it only lists new products from that category (1 level deep)

 

so if you do not have new products in that category, it does not display.

 

go to "uncommons" and it is there again.

Treasurer MFC

Link to comment
Share on other sites

the new_products module is category sensitive.

on the main page it displays new products from everywhere but in a category it only lists new products from that category (1 level deep)

 

so if you do not have new products in that category, it does not display.

 

go to "uncommons" and it is there again.

 

 

hmm... so there never was anything there and i just didn't notice it before?

 

I thought for sure i screwed something up.... :-"

 

 

one more thing - i just noticed there is a best seller's box now underneath my "new products"

 

not sure how i put it there, but how do i get rid of it?

 

again, my website is here

Link to comment
Share on other sites

i'm totally stumped. What file is the "new products for december" box in? is it even an infobox?

 

I can't find it ANYWHERE. Somehow when adding my scrolling best sellers box (i'm assuming that's when i did it) I added a regular best sellers box underneath my "new products for december" box, but only when i am in a category with products, not on the homepage.

 

Sooo weird and have no clue how to get rid of the darn thing... :'(

Link to comment
Share on other sites

the new_products module is category sensitive.

on the main page it displays new products from everywhere but in a category it only lists new products from that category (1 level deep)

 

so if you do not have new products in that category, it does not display.

 

go to "uncommons" and it is there again.

 

i just checked some other sites, and there's show up when only sub-categories are listed.

 

there is something i messed up here, just don't know what it is. If anyone has any ideas please let me know!

 

I don't want to advertise my site until i have this fixed, and i've put waaayyy too much time into it to give up now :/

Link to comment
Share on other sites

i just checked some other sites, and there's show up when only sub-categories are listed.

 

there is something i messed up here, just don't know what it is. If anyone has any ideas please let me know!

 

I don't want to advertise my site until i have this fixed, and i've put waaayyy too much time into it to give up now :/

 

If you want to get rid of the new products box find the following line in your index.php file

 

<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

 

and change to

 

<td><?php //include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

 

or remove it altogether. Personally I like the featured products contribution which changes the new products box to something you have more control over.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

If you want to get rid of the new products box find the following line in your index.php file

 

<td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

 

and change to

 

<td><?php //include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>

 

or remove it altogether. Personally I like the featured products contribution which changes the new products box to something you have more control over.

 

 

i DON'T want to get rid of it, my problem is it doesn't show up on all my pages...

if you go to My Webpage it is there, but then click on the category "non-foil singles" and only the header for the box is there.

 

I just want to know what i did and fix it so it shows up there again :/

 

edit*

here is the code for my new_products.php, could you see if that's what it's supposed to be?

<?php
/*
 $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- new_products //-->
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 new contentBoxHeading($info_box_contents);

 if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
   $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 } else {
   $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
 }

 $row = 0;
 $col = 0;
 $info_box_contents = array();
 while ($new_products = tep_db_fetch_array($new_products_query)) {
   $new_products['products_name'] = tep_get_products_name($new_products['products_id']);
   $info_box_contents[$row][$col] = array('align' => 'center',
                                          'params' => 'class="smallText" width="33%" valign="top"',
                                          'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])));

   $col ++;
   if ($col > 2) {
     $col = 0;
     $row ++;
   }
 }

 new contentBox($info_box_contents);
?>
<!-- new_products_eof //-->

Link to comment
Share on other sites

Okay 'New Products' works on the basis of when you entered the products in your catalog - so if you entered new products in November that was the month they were listed for. If you didn't add new products for a category or sub-category in December then they won't show up - cos they don't exist. If you want to recycle old products as being new for this (or any other month) you need to go into your control panel and edit them to being added to the catalog today.

 

The Best Sellers box shows up when an order for that item has been processed through your site. As you get more and more orders only the top best sellers will be displayed.

 

Vger

Link to comment
Share on other sites

Okay 'New Products' works on the basis of when you entered the products in your catalog - so if you entered new products in November that was the month they were listed for.  If you didn't add new products for a category or sub-category in December then they won't show up - cos they don't exist.  If you want to recycle old products as being new for this (or any other month) you need to go into your control panel and edit them to being added to the catalog today.

 

The Best Sellers box shows up when an order for that item has been processed through your site.  As you get more and more orders only the top best sellers will be displayed.

 

Vger

 

sigh, i don't think anyone is understanding me...

i have entered hundreds of products in december.

they show up on my home page.

 

now if you click on my category "non-foil singles" you come to a page with 3 sub-categories, "rares" "uncommons" "commons"

 

on this page, only the heading for the new products is listed. I have seen other sites that have a full working new products box in this same place.

 

then, if you click on the "uncommons" or "commons" sub-categories, the new products box shows up again.

 

is there a way to make the new products box appear when my customers click on my main categories?

Link to comment
Share on other sites

sigh, i don't think anyone is understanding me...

i have entered hundreds of products in december.

they show up on my home page.

 

now if you click on my category "non-foil singles" you come to a page with 3 sub-categories, "rares" "uncommons" "commons"

 

on this page, only the heading for the new products is listed. I have seen other sites that have a full working new products box in this same place.

 

then, if you click on the "uncommons" or "commons" sub-categories, the new products box shows up again.

 

is there a way to make the new products box appear when my customers click on my main categories?

 

the new product box only searches 1 level deep whn in a category. So if you stuff your products way down in a category tree they will show up way down in the category tree.

Treasurer MFC

Link to comment
Share on other sites

the new product box only searches 1 level deep whn in a category. So if you stuff your products way down in a category tree they will show up way down in the category tree.

 

is it possible to change that?

 

And why does the heading of the box show? In bestsellers, if there are no best sellers the box doesn't show at all, for the new products the heading of the box just sort of floats there....

Link to comment
Share on other sites

I think the depth comes from this in index.php and application_top.php - though I don't know how to amend it the way you want.

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$cateqories_products = tep_db_fetch_array($categories_products_query);

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

Vger

Link to comment
Share on other sites

I think the depth comes from this in index.php and application_top.php - though I don't know how to amend it the way you want.

 

// the following cPath references come from application_top.php

? $category_depth = 'top';

? if (isset($cPath) && tep_not_null($cPath)) {

? ? $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

? ? $cateqories_products = tep_db_fetch_array($categories_products_query);

? ? if ($cateqories_products['total'] > 0) {

? ? ? $category_depth = 'products'; // display products

? ? } else {

? ? ? $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

? ? ? $category_parent = tep_db_fetch_array($category_parent_query);

? ? ? if ($category_parent['total'] > 0) {

? ? ? ? $category_depth = 'nested'; // navigate through the categories

? ? ? } else {

? ? ? ? $category_depth = 'products'; // category has no products, but display the 'no products' message

? ? ? }

? ? }

? }

 

Vger

 

well, if anyone may happen to have a fix for this, please post!

Thanks :)

Christina

Link to comment
Share on other sites

Im sorry I didnt mention this earlier :blush:

 

I got around it ... if you go HERE

 

you will notice .. the box says Featured products blah etc...

I found a contribution that shows you random products instead of new products......

 

...thats one way around it. That way if you dont have new products ..your box wont be empty. I liked the idea even though my client is constantly getting new products.

 

search for Random New Products

 

:thumbsup:

 

 

oh btw: I see you finally got those banners at the footers to show up correctly

:thumbsup:

Link to comment
Share on other sites

Im sorry I didnt mention this earlier :blush:

 

I got around it ... if you go HERE

 

you will notice .. the box says Featured products blah etc...

I found a contribution that shows you random products instead of new products......

 

...thats one way around it.  That way if you dont have new products ..your box wont be empty.  I liked the idea even though my client is constantly getting new products.

 

search for Random New Products

 

:thumbsup:

oh btw:  I see you finally got those banners at the footers to show up correctly

:thumbsup:

 

Yeah, i had to do it manually, my banner manager doesn't work :/

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...