Jump to content

content/cart.tpl - Link back to view product


Guest webcitz

Recommended Posts

Guest webcitz

Hello Everyone,

I did search for this before posting it, but I found no answer.

I was wondering if anyone knows of a way to have the content/cart.tpl page include a link of the product name back to the view product page? Right now I have it set up so that when someone adds a product they are taken straight to their shopping cart. I also have a few form links that add products from external .html pages on my site. So, I would like to be able to either link the product name or put some text like (view info) after the product name and have it link back to the product details page.

This is what I have tried thus far and I think it failed because the cart.inc.php page doesn't have any php to tell the page what {PRODUCT_ID} is.

<a href="index.php?act=viewProd&amp;productId={PRODUCT_ID}" target="_self" class="txtDefault">{VAL_PRODUCT_NAME} (view details)</a>

Thank you very much for any help!

Link to comment
Share on other sites

Would it be possible for you to add a bit of javascript to process a "Back" command?

I'm not familiar enough with javascript to know what that command it, but I have seen it done before. In fact, isn't that what the "Previous Page" link on the cart pages does?

Link to comment
Share on other sites

Guest webcitz

Hey AlanT, thanks for the reply!

Yes, that would work in some situations. However, let's say the customer is on the homepage of my website, outside of the cart. I have a form set up on the home page to allow the visitor to click an input button to add a product and be taken into the shopping cart. So, if I used javascript to process the back command, I would just be taking them back to the home page.

I suppose if by setting up the link to go straight to the cart is causing me to need to have a way for people to go back and see the product page, then maybe I should just go back to the default way of adding a product.

It would still be helpful to know if there is a way to do this.

Link to comment
Share on other sites

  • 2 weeks later...

what would i put instead of the javascript to go back to the product page instaed of previous page.

my current added button code went viewing cart

<div style="float: left; margin-top: 22px; margin-bottom: 5px;"><a href="java script:history.back()" class="txtCheckout">Previous Page</a></div>




I know that mrkscarts has said to use {VAL_PRODUCT_ID} ; but it just adds the # of the product added to cart.



*ideally* to code would look like:




<div style="float: left; margin-top: 22px; margin-bottom: 5px;"><a href="{VAL_PRODUCT_ID}" class="txtCheckout">BACK TO PRODUCT</a></div>

something like that.....

pointers anyone?

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
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...