Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Call for price


Guest

Recommended Posts

After trying all the various contributions I have settled on mike the monk's contribution (http://www.oscommerce.com/community/contributions,4085)... But i am really having problems trying to get it to work. My client bought a template and then asked me to tweak it with the call for price feature. So after trying various contributions i kept getting stuck on the same problem.. which is..

 

In the contribution, it tells me to find the following:

 

$info_box_contents[] = array('align' => 'center',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br>' . $whats_new_price);

 

and replace with the following:

 

if ($random_product['products_price'] < 0.01) {

 

$info_box_contents[] = array('align' => 'center',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br>');

 

} else {

$info_box_contents[] = array('align' => 'center',

'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br>' . $whats_new_price);

}

 

 

Now the problem i have is that my code looks like this:

 

$info_box_contents[] = array('align' => 'center ',

'text' => '

<table cellspacing="0" cellpadding="0">

<tr>

<td width="216">

<table cellspacing="0" cellpadding="0">

<tr>

<td>'.tep_draw_separator('spacer.gif', '26', '1').'</td>

<td width="100%" height="115" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT,' class="pic"') . '</a></td>

<td>'.tep_draw_separator('spacer.gif', '25', '1').'</td>

</tr>

</table>

</td>

</tr>

</table>

<table cellspacing="0" cellpadding="0" class="column_left2">

<tr>

<td>'.tep_draw_separator('spacer.gif', '14', '1').'</td>

<td width="100%" height="46">

<br style="line-height:7px"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . substr( $random_product['products_name'],0,MAX_DESCR_NAME) . '</a><br style="line-height:1px;"><br style="line-height:5px;">

<span class="productSpecialPrice"><strong>' . $whats_new_price.'</strong></span></td>

</tr>

</table>

 

And i have no idea how to change it to what is needed.. I am not really familiar with php (who knows why i am working on this customers site i know!) so it is really baffling me. I have tried searching the forums for more information on any of the contributions, i've pm'd the creators of the contributions i have tried and have had no response back with help so now i am hoping someone out there can help me with this change.. After this is done i should be able to finish the rest of the changes which are similar and causing the same headache..

 

Thx in advance and i really hope someone can help... :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...