Guest webcitz Posted May 6, 2007 Share Posted May 6, 2007 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&productId={PRODUCT_ID}" target="_self" class="txtDefault">{VAL_PRODUCT_NAME} (view details)</a> Thank you very much for any help! Quote Link to comment Share on other sites More sharing options...
Guest webcitz Posted May 6, 2007 Share Posted May 6, 2007 Here is a link to the modifcation I want, but the download button and creator's website are no longer active http://www.cubecart.com/site/forums/index....oduct+from+cart Quote Link to comment Share on other sites More sharing options...
Guest Posted May 6, 2007 Share Posted May 6, 2007 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? Quote Link to comment Share on other sites More sharing options...
Guest webcitz Posted May 6, 2007 Share Posted May 6, 2007 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. Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 7, 2007 Share Posted May 7, 2007 Hi, this is simple, but you must use {VAL_PRODUCT_ID}, not {PRODUCT_ID} Quote Link to comment Share on other sites More sharing options...
Guest webcitz Posted May 9, 2007 Share Posted May 9, 2007 Thanks! Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 9, 2007 Share Posted May 9, 2007 You are welcome :innocent: Quote Link to comment Share on other sites More sharing options...
Guest Posted May 18, 2007 Share Posted May 18, 2007 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? Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 19, 2007 Share Posted May 19, 2007 <a href="index?act=viewProd&prodId={VAL_PRODUCT_ID}"> Quote Link to comment Share on other sites More sharing options...
Guest Posted May 19, 2007 Share Posted May 19, 2007 many thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.