Hi there,
This should be possible. Could you share a link to the single product?
You can also send the URL here if you would rather not share it publicly.
Marc
Hey Marc, thanks for the quick reply. I have sent a link in the form you linked – there are multiple buttons Im testing on, neither opening any!
Thanks. The issue is that the configurator scripts aren’t loaded, so you’ll have to force this.
There are several ways to do this:
- Add the custom field
mkl_load_configurator_on_page
with a value of 1 to the product where you want to add the button
- or use the filter
load_configurator_on_page
to force the scripts to load. This solution might be more appropriate if you have more than a couple of products to do.
e.g. the following will load the scripts everywhere:
add_filter( 'load_configurator_on_page', '__return_true' );
Though you may want to use a logic which will load the scripts only on specific products, instead of everywhere.
Ah I see – are there any reason why they are not loaded? Or that’s the nature of it? Else Ill try look into conditional page loading for sure!
are there any reason why they are not loaded?
Yes: by default the scripts are only loaded on configurable product pages, or when a shortcode is found in the page content. If the shortcode is somewhere else, like a widget or an other location, it is not found, and the scripts aren’t loaded.
In your case the shortcode appears to be in the short description of the product, so it’s not detected. Maybe if you put it in the full description as well it will work, but using the custom field or the filter would be more appropriate.
Hmm weird – it should not be in the short description, as it is dropped in via the Shortcode widget in Elementor. So that’s strange!
I inserted the PHP code, but now it seems that the buttons disappear when I load the product
Hmm weird – it should not be in the short description, as it is dropped in via the Shortcode widget in Elementor. So that’s strange!
The “post content” in a product is usually displayed in the “description” tab. So possibly Elementor stores this in a different database field.
Yeah that might be it. Any clue why it disappears when inserting the filter?
I inserted the PHP code, but now it seems that the buttons disappear when I load the product
I see, this looks like a conflict with the Variable product addon, which hides the button until a configurable variation is selected.
Ah, yes that makes sense. I’ll have to dig down into that, and see what I can do. Thanks for the great support though, and have a lovely weekend!
I’ve just sent you an updated version of the addon, which should hopefully fix that issue.
Hey Marc – that worked perfectly! Thanks a lot for saving me quite the headache – it opens just as it is supposed to now!
I have another question for the addon – is it fine I ask it here, or is it better I create another thread? It does not have semblance to the question asked here
Great!
Please use the premium support form for addon related questions, as we’re not allowed to support premium products here.