Okay
  Public Ticket #2745682
dynamic shortcodes
Closed

Comments

  • Succeedat Languages started the conversation

    I have created a product page template for some of my services (say for examples services 1, 2, 3 4) and wanted to use the shortcode:

    [ameliabooking service=1] 

    However this only shows service 1 (obviously).  Is there any way I can get the template to dynamically show the calendar for service 1 when the template is showing service 1, service 2 calendar for service 2 etc?

    I'm guessing not but thought I would at least check first

  • [deleted] replied

    Hi!

    Thank you for reaching out to us; I apologize for the later response, as we don't work on weekends.

    Unfortunately, yes, shortcodes don't have variables at the moment, and are static depending on the entered value (all services or one specific service per calendar).

    You can optionally show 2 separate ones on the page if that would be convenient for you [ameliabooking service=1]  and [ameliabooking service=2].

    It is a very good idea having a dynamic shortcode; if you have a moment, you can suggest that as a feature request here, or check if there is such request there and vote for it. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.

  • Succeedat Languages replied

    Hi Ivana,

    Thanks for getting back to me.  I will post a request to suggest dynamic short codes however for the time being I have found a way round the issue:

    I created the product in woo commerce and added the short code into the SKU as I don't use a SKU for my services.  I then added a shortcode widget in my product template using my page builder (elementor) and asked it to import the shortcode dynamically from the SKU input field of the product.  It works perfectly.

    Hopefully this will help others if they have the same issue.


  • [deleted] replied

    Hi,

    thank you for the kind reply!

    Also, thank you for taking time to go suggest it.

    If it works for you that way - great! I am just unable to suggest any workarounds that are not related to Amelia directly (without using third party software), as I can't guarantee it will work. 

    Thank you for understanding.