Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product_listing.php link into details page also without attributes


smacsloo

Recommended Posts

Posted

helllo community - im confused of one thing in osc 2.2a

 

in case of creating products without attributes the BUY NOW BUTTON redirects me into my cart,

but products with attributes are redirected into details page. is there a workaround to fix the product_listing.php always to go to details page,

elsewhere if there is an attribute or not?

 

i`ve found following code wich should be implemented too on this site http://www.oscommerce.com/forums/lofiversion/i...php?t96915.html

but the implementation of two buttons wont solve my problem, i only need one button wich always go to products info page.

 

can anybody help me please?

Posted

you could modify the product_listing module, but simpler to modify application_top as that deals with all cases.

 

find (365):

 

// performed by the 'buy now' button in product listings and review page
  case 'buy_now' :		if (isset($HTTP_GET_VARS['products_id'])) {
							if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
							  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
							} else {
							  $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
							}
						  }

 

replace with:

 

// performed by the 'buy now' button in product listings and review page
  case 'buy_now' :		if (isset($HTTP_GET_VARS['products_id'])) {
								tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
									}

 

 

you also need to change the 'buy now' button to a 'details' button

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Archived

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

×
×
  • Create New...