Jump to content

change the "checkout" link and have it redirect to purchase from another site....


Recommended Posts

I'm trying to change the "checkout" link to target a shopping cart that is hosted on another website. Is there a way I can remove the shopping cart on my site and then have each item target an off site link?

Please advise, I'm advanced HTML editor so if I can get a point in the right direction I think I can figure it out.

Thanks!

Link to comment
Share on other sites

I think what I need to do is:

Add an input area on the back-end item page that allows me to add the source for the checkout link

Then Change the code where the checkout button appears to use that link instead of other link

how would I go about doing this?

Link to comment
Share on other sites

So I want to add another field to the item page that would be the web address of the external site I want to refrence

I assume I need to add a field on the AdminProducts.php file to do this
so I added:



;
echo ''.$this->l('Link:').'';
foreach ($languages as $language)
{<input size="55" type="text" id="link" name="link"
value="'.htmlentities(Tools::getValue(link)), ENT_COMPAT, 'UTF-8').'" />
}';

I'm not sure if this code is correct but what I want it to do is add another field to the database with the link included with all the info for that item.

This would be the external link that a viewer would be sent to when clicking the "add to cart" button instead of the built in checkout cart.

So once I have the proper code in the AdminProducts.php file I would assume all I need to do is tell the template to get that html link and use that when posting the "add to cart" button

Ok, so I found this code that I can edit under the prodcut.tpl

<!-- add to cart form-->
<form id="buy_block" action="{$base_dir}cart.php" method="post">

I'm not sure how I need to change it to
get: HTML Link from Item info
post: send user to that link page



Please help! I'm trying to figure this out as best I can, I'm still learning how all this code works together!
Thanks!

Nate

Link to comment
Share on other sites

  • 5 years later...
  • 9 months later...
×
×
  • Create New...