jeremiah11 Posted August 10, 2008 Posted August 10, 2008 Hi ladies and gents, I need help linking an image and text to my specific product pages through their corresponding ID's. I looked at some code and noticed that there is no clear cut way to do this. I linked them the easy asp.net way but that makes them no flow with oscommerce login/logout controls....i need them in the php oscommerce specified manner with thier ID so i can keep a user logged in when they click on these links. For example i cannot use the easy <a href="product_info.php?products_id=29"><img class="two" src="../Images/cmass.png" width="190" height="171" alt="Company Logo"/></a> Can someone please steer me in the right direction so i can set up my own custom products overview page that correctly navigate to their corresponding product pages via ID. Thanks, Jeremiah :blush:
germ Posted August 10, 2008 Posted August 10, 2008 <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=29' . '">' . tep_image(DIR_WS_IMAGES . 'cmass.png', 'Company Logo', '190', '171', 'class="two" ' ) . '</a>'; ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
germ Posted August 10, 2008 Posted August 10, 2008 Better use this instead: <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=29' . '">' . tep_image(DIR_WS_IMAGES . 'cmass.png', 'Company Logo', '190', '171', 'class="two" ' ) . '</a>'; ?> If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
jeremiah11 Posted August 10, 2008 Author Posted August 10, 2008 <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=29' . '">' . tep_image(DIR_WS_IMAGES . 'cmass.png', 'Company Logo', '190', '171', 'class="two" ' ) . '</a>'; ?> That didnt seem to work since i got an error coming back in my browser saying 'unexpected ; on line 60. I tried taking it out and playing around with the punctuation but no luck. Any suggestions?
germ Posted August 11, 2008 Posted August 11, 2008 <?php echo '<a href=" ' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=29') . ' ">' . tep_image(DIR_WS_IMAGES . 'cmass.png', 'Company Logo', '190', '171', 'class="two" ' ) . '</a>'; ?> I hate it when I choke like that... :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
jeremiah11 Posted August 11, 2008 Author Posted August 11, 2008 <?php echo '<a href=" ' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=29') . ' ">' . tep_image(DIR_WS_IMAGES . 'cmass.png', 'Company Logo', '190', '171', 'class="two" ' ) . '</a>'; ?> I hate it when I choke like that... :blush: Thanks a million Jim ;)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.