Shortcode for the size guide pop-up to use in custom block

This topic has 10 replies, 2 voices, and was last updated 1 years, 9 months ago ago by Rose Tyler

  • Avatar: Niddy
    Niddy
    Participant
    March 13, 2023 at 14:42

    Hi

    I am creating a custom product layout and can position elements where I like using shortcodes. I want to know what the shortcode is for the size guide popup please?

    So for instance, if I want to display estimated shipping elsewhere on the page, I can use shortcode: [etheme_sales_booster_estimated_delivery] within a custom block or the dynamic short code way in elementor.

    However, I would like to use the shortcode for the size guide – is it something like: [etheme_single_product_size_guide] – could you please clarify?

    Basically I want to position it elsewhere using a shortcode.

    Ideally, it’d be good if you can show the shortcodes to display the elements within your product builder such as:

    1. Size Guide
    2. Add to Wishlist (xstore version)
    3. Social Sharing

    This way we can create a fully mobile custom product layout by using the static blocks and showing / hiding elements.

    At present I am having to use that much css that it is becoming crazy to manage 🙁

    If not can you tell me the hook name that outputs these fields and I’ll create shortcuts.

    Thanks

    9 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 14, 2023 at 09:13

    Hello, Niddy,

    Thank you for choosing XStore as your WooCommerce WordPress theme.

    We don’t have shortcode for each use but we have many functions which could be implemented in custom shortcodes 🙂
    You may try to add next PHP snippet to your child-theme/functions.php

    add_shortcode('etheme_child_size_guide', 'etheme_size_guide');
    
    if ( class_exists('XStoreCore\Modules\WooCommerce\XStore_Wishlist') ) {
    add_shortcode('etheme_child_wishlist_button', function() {
    $instance = XStoreCore\Modules\WooCommerce\XStore_Wishlist::get_instance();
    $instance->print_button();
    });
    }
    
    add_shortcode('etheme_child_social_share', 'woocommerce_template_single_sharing');
    

    I hope you will find those custom shortcodes useful for your cases.

    Kind Regards,
    8theme team

    Avatar: Niddy
    Niddy
    Participant
    March 14, 2023 at 11:09

    Hi

    sadly these do not work – they basically do nothing. Assuming the shortcodes would be as follows –

    [etheme_child_size_guide]
    [etheme_child_wishlist_button]
    [etheme_child_social_share]

    Thanks

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 14, 2023 at 16:17

    Hello, Niddy,

    It worked fine on our test site.
    Please provide correct temporary wp-admin and FTP access.
    Also, provide the page where you would like to display this.

    Kind Regards,
    8theme team

    Avatar: Niddy
    Niddy
    Participant
    March 14, 2023 at 16:26

    Hi

    I am adding them as a shortcode within elementor blocks. So example, in product builder I call static block #1 and in static block #1 I place loads of elementor content but then add a list using a shortcode – and nothing propagates.

    It’s not a page – it is specific to a category based on the product layout I built using product builder. Some have it, others do not.

    I don’t want to add it to the site just yet as I have done a workaround but based on my logic above, should it work? Or were your shortcodes aimed for putting inside the actual php template? I am literally only updating an elementor page and pulling shortcodes.

    Even adding one inside a pure html block doesn’t render anything 🙁

    See images in private.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 14, 2023 at 17:24

    Dear, Niddy,

    You did not provide URL of page we asked for, so we did the test by ourselves on your site and mentioned shortcodes work fine. Examples are in the Private Content area.

    If you need any further assistance with additional customization and shortcodes, we recommend submitting a customization request to the WPKraken team.
    Please note that additional customization in files is outside the scope of our basic support.

    Kind Regards,
    8theme team

    Please contact administrator
    for this information.
    Avatar: Niddy
    Niddy
    Participant
    March 14, 2023 at 17:37

    Hi

    Thanks but yes I can’t use the static block placement as I need 12 and there’s only 5. Hence that’s why I’m explaining that I want to load the shortcode into my custom block.

    Everything I’ve said is the opposite of what you’ve done. I did say it’s specifically being added to a custom block. I don’t want the html blocks on the template changing as they’re controlling the responsiveness due to the lack of this within page builder – I notice a request was added for this a while ago and I hope it’s added soon as we are using all the custom block placements to make sections hidden on cross-devices.

    Please ensure my site is exactly how it was as it’s extremely complex.

    Where you added the shortcodes is where I’m calling the static block that has the shortcode AND much more content inside it.

    I don’t want customisation. I’m more than capable. I’m merely asking you as the author of the product to supply the correct shortcode to display your custom elements anywhere. That’s a basic request – ie a list of shortcodes. I’m not asking for assistance although you know I do appreciate your help. 🙁

    Thanks.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 14, 2023 at 17:45

    Hello, Niddy

    “Please put my site back to how it was.” – we did not save our changes at the end. Tests were done, but they are on screenshots, your real site is not changed.

    “As I explained all I want is to be able to call my shortcode from within a html block (elementor), or using dynamic option of shortcode. ” – what is URL of page where you tried to do this? On which page we can do tests? Please provide the URL.

    “That’s a basic request – ie a list of shortcodes. ” – there are no ready shortcodes for mentioned by you elements.

    Kind Regards,
    8theme team

    Avatar: Niddy
    Niddy
    Participant
    March 14, 2023 at 17:53

    Thanks Rose. You’re awesome.

    See private. 🙂

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 15, 2023 at 07:39

    Hello, Niddy,

    We will leave it for now.

    If you have other questions or concerns, please do not hesitate to reach out to us. Our support team is always available to assist you.

    Kind Regards,
    8theme team

  • Viewing 10 results - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.