Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

My Wishlist v1.03 installation help!


Guest

Recommended Posts

Hi everyone.

Im currenty trying to install the My Wishlist v1.03 addon however im a bit stuck with the installation instructions.

 

The bit im having problems with is:

 

------------------------------------------------

in action handler add & replace

------------------------------------------------

replace

-------------------------------------------------

case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {

if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));

} else {

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

-------------------------------------------------

with this

-------------------------------------------------

 

case 'cust_order' :

if (isset($HTTP_GET_VARS['pid']))

{

 

///////////////////////////////

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

//////////////////////////////

// remove here from wishlist

$wishlist->remove($HTTP_GET_VARS['pid']);

// $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

 

}

tep_redirect(tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params($parameters)));

break;

 

// Add product to the wishlist

 

case 'add_wishlist' : if (ereg('^[0-9]+$', $HTTP_GET_VARS['products_id'])) {

$wishlist->add_cart($HTTP_GET_VARS['products_id'],

$wishlist->get_quantity(tep_get_uprid($HTTP_GET_VARS['products_id'], $HTTP_GET_VARS['id']))+1, $HTTP_GET_VARS['id']);

}

tep_redirect(tep_href_link(FILENAME_WISHLIST, tep_get_all_get_params($parameters), 'NONSSL'));

break;

// Add wishlist item to the cart

case 'wishlist_add_cart': tep_redirect(tep_href_link(FILENAME_WISHLIST));

break;

 

 

// remove item from the wishlist

///// CHANGES TO case 'remove_wishlist' BY DREAMSCAPE /////

case 'remove_wishlist' :

$wishlist->remove($HTTP_GET_VARS['pid']);

tep_redirect(tep_href_link(FILENAME_WISHLIST),'','NONSSL');

break;

//End Wishlist 2.0.1 Modification

case 'add_wishlist_from_cart' :

if (isset($HTTP_GET_VARS['pid']))

{

 

///////////////////////////////

$cart->remove($HTTP_GET_VARS['pid']);

//////////////////////////////

$wishlist->add_cart($HTTP_GET_VARS['pid'],

$wishlist->get_quantity(tep_get_uprid($HTTP_GET_VARS['pid'], $HTTP_GET_VARS['id']))+1, $HTTP_GET_VARS['id']);

// $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);

 

}

break;

 

 

 

Where do i find the action handler/what is this?

Many thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...