• HI,

    the product id should be 648 in my overview of my products but i get this error:

    A product id must be set in order for this shortcode to work.

    How do i fix this?

    A product id must be set in order for this shortcode to work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marc Lacroix

    (@marcusig)

    Hi there,

    Could you give more context of what you’re doing?

    If you add the shortcode on a product page, the product ID should automatically be found.

    If you use the shortcode on an other page, you need to specify the ID.
    E.g. [mkl_configurator product_id=648]

    Marc

    Thread Starter justinwword

    (@justinwword)

    Hi,

    Sorry their is missing some text in the topic. I don’t know why. Let’s try again.

    The page i am trying to make: https://retlow.nl/product/dj-show/ password = 1

    shortcodes there:

    
    [mkl_configurator product_id=648classes="container-class something-else"]
    
    [mkl_configurator_button product_id=648classes=”button primary”]Button name[/mkl_configurator_button]
    
    [mkl_configurator_button product_id=648 classes="button primary"]

    But these are not working.(i also tried with ][ between the 648 but didn’t help)

    Plugin Contributor Marc Lacroix

    (@marcusig)

    Hi,

    The configurator is opened in the “Beschrijving” tab:

    The other buttons will try to open the configurator, but it’s already opened, so nothing more happens.

    Marc

    Thread Starter justinwword

    (@justinwword)

    Yeah i know, but these shortcodes do not work at other pages. So how can i fix that?

    Plugin Contributor Marc Lacroix

    (@marcusig)

    If they don’t work, there’s a chance that the shortcode isn’t detected, so the scripts aren’t loaded.

    You could try to force the scripts to be loaded, using the following hook:

    add_filter( 'load_configurator_on_page', '__return_true' );

    This will load the scripts on every page.
    You can also replace __return_true by a function with some logic to define whether or not to load those scripts.

    Thread Starter justinwword

    (@justinwword)

    Hi thanks, this fixed it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Product id’ is closed to new replies.