Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add to array


Guest

Recommended Posts

I have the following code:

$params = array(

'{CELL_HEIGHT}' => '100',

'{IMAGE}' => $pic_html,

'{ADMIN_MENU}' => $picture_menu,

'{TITLE}' => $CURRENT_PIC_DATA['title'],

'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),

);

I have defined a parameter which creates a buyme button (that part works when I use echo and print it out), but I want to display it after the image, likle this:

$params = array(

'{CELL_HEIGHT}' => '100',

'{IMAGE}' => $pic_html,

'{BUYME}' => $buyme,

'{ADMIN_MENU}' => $picture_menu,

'{TITLE}' => $CURRENT_PIC_DATA['title'],

'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),

);

When I do this nothing happens. Any clues?

Also where are parameters defined that are global such as: global $CURRENT_PIC_DATA ??

Link to comment
Share on other sites

here is a method for adding a buy now button complete with link this would go here

 

 

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

 

I hope this helps a little

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...