Jump to content

OSC Buy Now Link


dink

Recommended Posts

Hi everyone,

 

I am really really new to php. I am fumbling my way around trying to learn as I go. I have some experience in object oriented programming so it is not all greek just most of it. ::)

This is the problem:

I have a separate page set up on our OSC site for services that will be sold. http://www.computerhmo.com/store/index2.php

Initially it was only to be used as an information page. Now my boss wants me to add "Buy Now" buttons for each service.

I am thinking there is a way to add a link but I am not sure how.

I found a couple of pieces of code but apparently I am not doing something right because it doesn't work properly. I got the link inserted but when I click on it the shopping cart is empty.

Can someone please help me get this fixed?

 

Example 1:

<a href="<?php echo tep_href_link(basename($PHP_SELF),
tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='
. $listing['44']); ?>"><?php echo tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW); ?></a>

 

I also tried this

Example 2

<a href="products.php?id=44">Buy</a>

 

Your help is needed and appreciated.

Someday, maybe, I will be as smart as all of you.

dink

Link to comment
https://forums.phpfreaks.com/topic/173607-osc-buy-now-link/
Share on other sites

<?php 
$href = tep_href_link(basename($PHP_SELF),tep_get_all_get_params(array('action')) . "?action=buy_now&products_id=" . $listing['44']);
tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW);
echo "<a href='" . $href . "'>" . $img . "</a>";
?>

 

Try this?

Link to comment
https://forums.phpfreaks.com/topic/173607-osc-buy-now-link/#findComment-915541
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.