Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist layout problems


starynightskyz

Recommended Posts

This morning I added the wishlist contribution. And afterward my layout is all distorted. I have my page at 990 px using centercart and the container is (was) a solid grey. Now I have sections of grey it stretches accross the full page.

The only thing I did different was to add the box to the left, rather than the right side of the page. Can anyone think of or see a snippit of the code that might conflict with center cart?

 

Thank you for you help,

 

 

View My Site

 

below is the instructions for manual install.

Product_info.php

Find at around line 82


   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'];
   }



ADD BELOW


//DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED
if(tep_session_is_registered('wishlist_id')) {
?>
  <tr>
	<td class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td>
  </tr>
<?php
	tep_session_unregister('wishlist_id');
}
//DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED




AROUND LINE 221 FIND

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

ADD UNDER THIS
// WISHLIST
<td align="center"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td>
//WISHLIST



END PRODUCT_INFO.PHP EDITS


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

Edit catalog/checkout_process.php

FIND THIS CODE AROUND LINE 291

// load the after_process function from the payment modules
 $payment_modules->after_process();



ADD AFTER 



// remove items from wishlist if customer purchased them
 $wishList->clear();



END CHECKOUT_PROCESS.PHP EDIT

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

Edit catalog/logoff.php

FIND AROUND LINE 26

$cart->reset();

ADD BELOW

$wishList->reset();
END LOGOFF.PHP EDIT

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

Edit catalog/login.php

FIND AROUND LINE 57

// restore cart contents
       $cart->restore_contents();

ADD UNDER 

// restore wishlist to sesssion 
$wishList->restore_wishlist();

END LOGIN.PHP EDIT

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

Edit catalog/create_account.php

FIND AROUND LINE 229

// restore cart contents
     $cart->restore_contents()

ADD UNDER

// restore wishlist to sesssion
       $wishList->restore_wishlist();

END CREATE_ACCOUNT.PHP EDIT

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

Edit catalog/includes/filenames.php

ADD TO THE END BEFORE THE LAST ?>

 define('FILENAME_WISHLIST', 'wishlist.php');
 define('FILENAME_WISHLIST_HELP', 'wishlist_help.php');
 define('FILENAME_WISHLIST_PUBLIC', 'wishlist_public.php');

END FILENAMES.PHP EDIT

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

Edit catalog/includes/database_tables.php

ADD TO THE END BEFORE THE LAST ?>

 define('TABLE_WISHLIST', 'customers_wishlist');
 define('TABLE_WISHLIST_ATTRIBUTES', 'customers_wishlist_attributes');


END DATABASE_TABLES.PHP EDIT

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


Edit catalog/includes/colum_right.php

FIND
  require(DIR_WS_BOXES . 'shopping_cart.php');

ADD BELOW

if($wishList->count_wishlist() != '0') {
require(DIR_WS_BOXES . 'wishlist.php');
 }

END COLUM_RIGHT.PHP EDIT

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


Edit catalog/includes/application_top.php

FIND AROUND LINE 24

// include shopping cart class
 require(DIR_WS_CLASSES . 'shopping_cart.php');


ADD BELOW

// include wishlist class
 require(DIR_WS_CLASSES . 'wishlist.php');


FIND AROUND LINE 317

// Shopping cart actions

Directly above that code ADD this:

ADD THE FOLLOWING CODE SEE THE WARNING BELOW ALSO ****** ABOVE ********



          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    NOTE   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IF YOU DO NOT ADD THIS THEN THE ADD TO WISHLIST BUTTON WILL ADD THE ITEM TO THE SHOPPING CART

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@



// wishlist data
 if(!tep_session_is_registered('wishList')) {
 	tep_session_register('wishList');
 	$wishList = new wishlist;
 }

//Wishlist actions (must be before shopping cart actions)
 if(isset($HTTP_POST_VARS['wishlist_x'])) {
if(isset($HTTP_POST_VARS['products_id'])) {
	if(isset($HTTP_POST_VARS['id'])) {
		$attributes_id = $HTTP_POST_VARS['id'];
		tep_session_register('attributes_id');
	}
	$wishlist_id = $HTTP_POST_VARS['products_id'];
	tep_session_register('wishlist_id');
}
tep_redirect(tep_href_link(FILENAME_WISHLIST));
 }



          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    NOTE   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

IF YOU DO NOT ADD THIS THEN THE ADD TO WISHLIST BUTTON WILL ADD THE ITEM TO THE SHOPPING CART

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@



END APPLICATION_TOP.PHP EDIT

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

Edit catalog/includes/languages/english.php
Find this code:

// shopping_cart box text in includes/boxes/shopping_cart.php
define('BOX_HEADING_SHOPPING_CART', 'Shopping Cart');
define('BOX_SHOPPING_CART_EMPTY', '0 items');

ADD BELOW

// wishlist box text in includes/boxes/wishlist.php
define('BOX_HEADING_CUSTOMER_WISHLIST', 'My Wishlist');
define('TEXT_WISHLIST_COUNT', 'Currently %s items are on your Wish List.');

ENGLISH.PHP END EDIT


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


Edit catalog/includes/languages/english/product_info.php

Add at the very bottom before the ?>


//WISHLIST ADDITION
define('PRODUCT_ADDED_TO_WISHLIST', 'Product has been successfully added to your wishlist');

END PRODUCT_INFO.PHP EDIT

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

Add in a link to the wishlist wherever you want

Place this code where you want the "My Wishlist" link to appear, whether it be on the account page or in the header. Your choice. Use this code: 


<a href="<?php echo tep_href_link(FILENAME_WISHLIST); ?>"><?php echo BOX_HEADING_CUSTOMER_WISHLIST; ?></a>


********************************************************************************************************
##################################################################
##################################################################
##################################################################

                      ADMIN INSTALLATION

##################################################################
##################################################################
##################################################################

EDIT ADMIN/INCLUDES/BOXES/REPORTS.PHP
ADD 
'<a href="' . tep_href_link(FILENAME_STATS_WISHLISTS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_WISHLISTS . '</a><br>' . 

END REPORTS.PHP

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


Edit catalog/admin/includes/database_tables.php

Add at the very bottom before the ?> 


 define('TABLE_WISHLIST', 'customers_wishlist');
 define('TABLE_WISHLIST_ATTRIBUTES', 'customers_wishlist_attributes');


END DATABASE_TABLES.PHP EDIT

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


Edit catalog/admin/includes/functions/general.php

FIND AROUND LINE 901

   tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int)$product_id . "' or products_id like '" . (int)$product_id . "{%'");


ADD BELOW

//Wishlist addition to delete products from the wishlist when deleted
tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . (int)$product_id . "'");
tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'");

END GENERAL.PHP EDIT


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













BY UMAR
********************************************************************************************************


Edit catalog/admin/includes/filenames.php


ADD before last ?>

//Wishlist addition 
 define('FILENAME_STATS_WISHLISTS', 'stats_wishlists.php');

END FILENAMES.PHP EDIT


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

Edit catalog/admin/includes/languages/english.php

FIND AROUND LINE 96

 define('BOX_REPORTS_PRODUCTS_PURCHASED', 'Products Purchased');


ADD BELOW

//Wishlist addition 
 define('BOX_REPORTS_WISHLISTS', 'Products Wishlisted');

END ENGLISH.PHP EDIT

Link to comment
Share on other sites

Look at the HTML source.

 

You don't have this at the top:

 

<div id= "CONTAINER">

And this at the bottom:

 

</div>

So the site spans the entire page.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Look at the HTML source.

 

You don't have this at the top:

 

<div id= "CONTAINER">

And this at the bottom:

 

</div>

So the site spans the entire page.

 

 

Ahh Germ, I'm sorry ( embarassed ) to have to ask, where, in what folder, what page/s should I be looking for the

<div id= "CONTAINER">

I'm not exactly sure what you mean by HTML Source. I know there is snippits everywhere through out the site. but I'm not sure of what I should be looking for exactly.

 

 

Tanx

Link to comment
Share on other sites

Thanx Germ,

 

I did eventually get it... you were absolutly right it was the missing

<div id= "CONTAINER">

 

While still searching for a fix for the problem, I ended up returning to the instructions for Virtical Center shop contrib.

and there is was,

Open /catalog/include/header.php

Find the following code:

 if ($messageStack->size('header') > 0) {
   echo $messageStack->output('header');
 }
?>

Straight after add the following code:

<div id="CONTAINER">

 

I took a look and sure enough it was MIA ,

 

 

It took a bit to catch on but it's fixed, Thanks to your help!

 

Nancy :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...