Hi,
I am porting my site from Joomla/Sobipro over to WordPress/Toolset
I need to create a dynamic affiliate link that is created by looking at 2 different variables in the Post type called "Brides":
Agency - which is a taxonomy
ID# - which is a field
Each of the "Agencies" have a different linking structure for their affiliate links. So, I first need to look at which "Agency" the entry is associated with then, depending on the outcome, I need to create a custom url by inserting the "ID#" of the entry into the url of the affiliate link.
It is even more complicated because most of the URLs need to have the ID# dynamically inserted into the middle of the URL, like this:
hidden link
I am currently using Joomla/SobiPro to do this.
Here is a snippet of the code that Sobipro uses to generate the dynamic urls to give you a better idea of what I'm talking about - I do not want to use this code in Toolset - so please dont tell me that you don't debug 3rd party apps like the last support guy - this is just included as an example of what I did before.
--------------------------------------------
<xsl:choose>
<xsl:when test="entry/fields/field_agencies/data = 'Amolatina' ">
<xsl:attribute name="href">
<xsl:text>hidden link;
<xsl:value-of select="entry/fields/field_id/data"/>
<xsl:text>%26afid%3D20103%26subafid%3D{affiliate_id}%26transaction-id%3D{transaction_id}%26offer-id%3D{offer_id}</xsl:text>
</xsl:attribute>
</xsl:when>
<xsl:when test="entry/fields/field_agencies/data = 'Anastasia' ">
<xsl:attribute name="href">
<xsl:text>hidden link;
<xsl:value-of select="entry/fields/field_id/data"/>
<xsl:text>%26afid%3D20068%26subafid%3D{affiliate_id}%26transaction-id%3D{transaction_id}%26offer-id%3D{offer_id}%26RMC%3D{aff_sub}%26utm_source%3DHasOffers%26utm_medium%3DCPA%26utm_campaign%3DFirstOrder</xsl:text>
</xsl:attribute>
</xsl:when>
-------------------------------------------
I would like to output the finished URL as a shortcode so I can use it to add the link to an image in my main content template.
I have been trying to figure this out for 2 days now - could you take a look and see if you can lead me in the right direct. If you can just give me a basic overview of how you would achieve this I could probably figure out the particulars by myself.
Thanks!
internationallovescout.info/wp-admin
ChrisB
test99