Jump to content

Show additional, external Pay Now button for certain products


Recommended Posts

Hi,

 

I am trying to add an additional button under the 'Add to Basket' button on the Product Page.

 

Some of our products can be purchased via a third party and the majority of customers prefer to do it that way. So... For the products that are available via a third party, I want to add an additional button linking to their website.

 

What would be the best way to do this?

Link to comment
Share on other sites

Create "a virtual category" for the products which isn't visible to customers. Add the relevant products to this invisible category.

In product.tpl check if this category is set (you need to check the whole tree, not the default category).

If the condition is is true, present the button.

If not, do nothing.

Edited by Scully (see edit history)
Link to comment
Share on other sites

I would create a module that registers one of the product page hooks.  Then in your module, you can determine if the product is one of the external products, and then present a link/button to the third party site.

 

I like the idea from Scully, about placing those products in a specific category, this way the modules logic is simplified to just checking if the product exists in that category.

Link to comment
Share on other sites

I've got a problem...

 

The link to the website is the same but the product code changes at the end... How would I get this working dynamically for each product?

 

For example...

Product A: https://my.link.co.uk/Catalogue/product/code1

Product B: Product A: https://my.link.co.uk/Catalogue/product/code2

 

So the additional Payment button would link to the link that matches that product? It's not one link suits all. Got any ideas?

Link to comment
Share on other sites

The question is: where does "code" come from? You need this information from somewhere stored in your products. If you don't have "code", you are not able to provide the correct link. Maybe you can use the product reference for that?

Link to comment
Share on other sites

The question is: where does "code" come from? You need this information from somewhere stored in your products. If you don't have "code", you are not able to provide the correct link. Maybe you can use the product reference for that?

I use the Product Reference field for our internal product reference code but the one the supplier uses is different... Would it be bad for SEO or any other con to using maybe another field for it?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...