Skip Navigation

[Closed] Types shortcode inside third party shortcode inside view

This support ticket is created 7 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 25 replies, has 2 voices.

Last updated by Shane 7 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#461405

Hello,
I am trying to display this shortcode in a view loop but it does not work
[asa2 value="OffersMainPriceAmount"][types field="asin-amazon"][/types][/asa2]
As you can see, that is a custom field created with types inside a third party shortcode.
Both plugins work perfectly separately but not together, thats what the shortcodes returns separately:
[types field="asin-amazon"][/types] = B01LWX98Q8
[asa2 value="OffersMainPriceAmount"]B01LWX98Q8[/asa2] = 429,00

What I whould like to get is this:
[asa2 value="OffersMainPriceAmount"][types field="asin-amazon"][/types][/asa2] = 429,00

But when I load the page where the view should be display I get an error. The only content of that page that appears is the tittle.

I get the same result if I write the same external shortcode with and empty internal shorcode (only brackets):

[asa2 value="OffersMainPriceAmount"][][/asa2]

So I guess the problem is related with the views module...

I tried to register the third party shortcode with the name (asa2) but it does not work.

Asa2 is a shortcode from a third party plugin (hidden link)

#461415

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christian,

Thank you for contacting our support forum.

What you can try doing is to add this shortcode to our views third party shortocdes and let me know if it works.

This can be found under Toolset -> Settings -> Frontend -> 3rd party shortcode arguments.

Please try this and let me know the results.

Thanks,
Shane

#461424

I already tried to register the third party shortcode with the name (asa2) but it did not work

#461469

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christian,

I think this is occurring because your shortcode may not be processing our types shortcode.

Have a look at the link below and let me know if this helps.
hidden link
Thanks,
Shane

#462257

Hi again Shane,

A tried to implement that solution but it does not work. Any other idea???

#462522

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cristian,

Could you provide me with a copy of the shortcode so that I can have a look ?

Thanks,
Shane

#462571

The shortcode is created by a plugin called Amazon Simple Affiliate. This plugin connects with Amazon via API

There is a free version of that plugin (hidden link) but I am usin the pro version.
If you want I can send you privately a copy of that pro version for testing purposes and also an Amazon "Access Key Id" and "AWSSecretKey" for Amazon Api connection

Let me know a private email please and I will send you everything

#462829

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cristian,

I see so, I thought it was a plugin that you had developed.

In this case I would recommend getting the support team for the plugin involved as well. The reason is because they could be doing something that is stripping out or not parsing the shortcodes.

It would be a best practice to contact them because any work that would be done would be on their plugin side and this goes against our support policy 🙁

Would you mind contacting them and let me know the results and how best I can help 🙂

Thanks,
Shane

#462986

Ok Shane I have been talking with "Amazon Simple Affilate" plugin developer and they have resolved the incompatibility problem between the shortcodes ([asa2 value="OffersMainPriceAmount"][types field="asin-amazon"][/types][/asa2]) , so that is the new situation:

-It works perfectly if I introduce the shorcodes in the post content template
-It does not work if I introduce the shorcodes in a view.

This is the plugin developer replay:


Now the loop walks till the end. BUT: It does not load the product boxes because the ASINs inside the loop get prepended with the string "###SPACE###". You can see the ASA 2 error messages in the Log section:
hidden link
This is why the products in the loop do not get displayed, because the ASIN "###SPACE###B01LWX98Q8" is obviously not a valid ASIN. I do not know where the "###SPACE###" is coming from. Definitely not out of ASA 2. I guess it has something to do with the Types template rendering. Please ask the Types devs if they know where it comes from.
I hope I was able to help you. If you still have questions, please let me know.
Kind regards
Timo

#462992

I do not know if you understand what he say, maybe it is not clear because you don't know how ASA plugin works, I am going to try to clarify that:

"ASIN" is an Amazon code like this: B01LWX98Q8. This code indentfy a unique product.

I created a Post Field called "asin-amazon" for that number, so:

    The shortcode [types field="asin-amazon"][/types] displays B01LWX98Q8.
    This shortcode [asa2 value="OffersMainPriceAmount"]B01LWX98Q8[/asa2] displays the price of that product, for example 251,58
    If I combine both shortcodes [asa2 value="OffersMainPriceAmount"][types field="asin-amazon"][/types][/asa2] in a post content template it works perfectly, that shortcode displays de price, but if I combine them in a view there is an error

That error is because the ASIN that should be "B01LWX98Q8" becomes in this "###SPACE###B01LWX98Q8" but only in views. It is like if Types added a string "###SPACE###" before B01LWX98Q8. So obiously Amazon cannot identify that string as an ASIN

#463240

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cristian,

Lets try something to see if its actually an issue with the Types shortcode.

Try using this [wpv-post-field name='wpcf-asin-amazon']

Please let me know the results.
Thanks,
Shane

#463324

Thank you Shane,

Unfortunatelly I got the same error...
If you want I can give you access to my wp-admin and hidden link.
Giveme a private email please...

#463390

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cristian,

The private fields have been enabled.

Thanks,
Shane

#464328

Hi Shane,
Did you get my wp and ftp credentials??

#464511

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Christian,

Yes I did but the forum is a bit loaded right now so thats the reason for the delay.

I'll have a look as soon as I can.

Thanks,
Shane

The topic ‘[Closed] Types shortcode inside third party shortcode inside view’ is closed to new replies.