Change buy now to url link
#1
Posted 29 July 2004, 21:33
Trying to create a link directory, just seems to be this one stumbling block,
any help appreciated
Thanks
#2
Posted 29 July 2004, 21:36
#3
Posted 29 July 2004, 21:40
Thanks
#4
Posted 29 July 2004, 21:44
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
break;
and replace with
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
break;
#5
Posted 29 July 2004, 21:51
would it not have to go through redirect.php?
Thanks for the reply
#6
Posted 29 July 2004, 21:54
#7
Posted 29 July 2004, 21:54
#8
Posted 29 July 2004, 21:55
#9
Posted 29 July 2004, 21:57
e.g. microsoft product and the buy now button goes to microsoft.com
#10
Posted 29 July 2004, 21:59
#11
Posted 29 July 2004, 22:03
when adding a new product, theres a products url box,
i would like it when the buy now button is clicked it will go to the product url
#12
Posted 29 July 2004, 22:04
Do you have a site you can show me, and list the steps of what you mean...
#13
Posted 29 July 2004, 22:09
say i add a new product in admin e.g. fifa2004 pc game
i put in the product description etc..
then i come to the products url box and put the url to the game http://www.fifa2004.com
i would like it so that when you see the category view the buy-now button will go to the http://www.fifa2004.com page
(i've already got it to do this in the product_info page it's the just the product_listing one i can't do)
#14
Posted 29 July 2004, 22:12
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . $listing['products_url'] . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
break;
Edited by rcmdesign, 29 July 2004, 22:12.
#15
Posted 29 July 2004, 22:15
thanks for your help so far tho mate
#16
Posted 29 July 2004, 22:16
#17
Posted 29 July 2004, 22:17
(i want the link in the place of the current buy now slot, i'll change the buttom once the link works)
Edited by K-P, 29 July 2004, 22:21.
#18
Posted 29 July 2004, 22:20
P.S. There are a lot easier things to use in PHP than osCommerce for a site with just links..For example, http://www.phpnuke.org
Edited by rcmdesign, 29 July 2004, 22:21.
#19
Posted 29 July 2004, 22:22
click reviews
i basically want the buy_now buttom in the category view to link externally link the review buttom does in product_info
Edited by K-P, 29 July 2004, 22:24.
#20
Posted 29 July 2004, 22:22
what code are u using ?
the underlying link should call to the db to get the product home url.
Edited by yesudo, 29 July 2004, 22:23.














