Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product ID in page


Guest

Recommended Posts

Posted

I am placing a link in the text of the page_info.php - below item description, and I want the link to be dl/[PRODUCT_ID]

 

where [PRODUCT_ID] is the ID of the product being viewed, as shown in URL!

 

I tried putting <a href=dl/p.products_id>, then tried putting dl/<?php p.products_id ?> hoping it would do it, with no luck.

e.g. if the product ID is 15 then link URL is dl/15!

 

Can anybody give me any guidance on this?

 

Thanks alot

Posted

only the file dl/PRODUCT_ID.zip but i gathered once I will just add the extension once I have help!

 

Thanks

Posted

Try this

<tr>
<td align="center" class="main">
  <?php 
$file = sprintf("%s.zip", $product_info['products_id']);
echo '<a href="http://www.yoursite.com/downloads/' .$file . '">' . "Download" . '</a>'; 
  ?></td>
</tr>

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Archived

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

×
×
  • Create New...