Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Adding review buttons in order history


Recommended Posts

I have been trying to make it easier for customers to add reviews. Some had trouble finding where or how to do it.


Therefor I would like to add buttons infront of every item/product in account_history_info.php

So when members login and click on a previous placed order... They should be able to click on a button next to the product... That will take them to the products_reviews_write.php for that particular product!


Now, I have inserted the buttons in the PHP.

And added most of the code for the link on that button.

However I don't know the code for inserting the products_id # taken from the database.


'			<td class="main" align="left" valign="bottom" width="1"> <a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE . '?products_id=' . ??????????) . '">' . tep_image_button('small_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td>' . "\n" .


I would asume the questionmarks in the above code should be replaced with something like this:


$orders_products['products_id'] where $orders_products['orders_id'] = (int)$HTTP_GET_VARS['order_id']


Obviously that ain't the proper code! :blush:


Can someone of you brilliant minds please write the proper code for me???

Link to comment
Share on other sites


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

  • Create New...