SP Booking - Question | JoomShaper
🎃 Halloween Sale is Live! Get 35% OFF on all plans. Sale ends soon! Get Offer

SP Booking

R

Roderick

General 4 months ago

Dear Support,

I’m using the SP Booking component and I’d like to ask if there’s a way to hide the “Tour Overview” and “Itinerary” headings in the SP Booking Package component when no content is entered for those fields.

Some of my packages do have entries for these sections, so I would like the headings to display only when there is actual content.

Would it be possible to use a CSS script or custom code to achieve this? I’d appreciate your guidance on how to implement it.

Thank you in advance!

Appreciate any help.

Regards,

Rod

0
5 Answers
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 4 months ago #195582

Please add the following JS code to your Template Options -> Custom Code -> Custom JS

document.addEventListener('DOMContentLoaded', function() {
    const itenaryTitle = document.querySelector('.itenary-title');
    const itenaryTab = document.querySelector('.itenary-tab');
    const tourOverviewTitle = document.querySelector('.tour-over-view-title');
    const tourOverviewDetails = document.querySelector('.tour-overview-details');

    if (itenaryTitle) {
        itenaryTitle.style.display = itenaryTab ? 'block' : 'none';
    }

    if (!tourOverviewDetails && tourOverviewTitle) {
        tourOverviewTitle.style.display = 'none';
    }
});
0
R
Roderick
Accepted Answer
4 months ago #195625

Hello Atick,

Thank you so much for the script. I applied it, and my page now looks much better.

I truly appreciate your help!​ More power to JoomShapper!

Regards,

Rod

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 4 months ago #195626

Hello Rod,

You're most welcome! I'm really glad to hear the script worked well and your page looks better now.

Thank you for your kind words and support — it means a lot to us at JoomShaper!

If you need any further assistance, feel free to reach out anytime.

Best regards

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 4 months ago #195529

Hello Rod,

Thank you for reaching out, and I sincerely apologize for the inconvenience.

Unfortunately, the SP Booking component does not currently offer a built-in setting to automatically hide the “Tour Overview” and “Itinerary” headings when those fields are left empty. Additionally, this cannot be achieved through CSS alone, as CSS does not support conditional logic based on content presence.

However, it might be possible to accomplish this using custom JavaScript. To better assist you, could you please share your website URL? I’d be happy to take a closer look and determine whether a solution can be implemented for your specific setup—possibly even with some CSS if the markup allows for it.

Looking forward to your response.

Best regards

0
R
Roderick
Accepted Answer
4 months ago #195535

Hello Atick,

Thank you for your prompt response. Please see below URL: https://www.primarytours.com/ptti2025/index.php/component/spbooking/package/25-the-mind-museum?Itemid=178

Appreciate any help.

Regards,

Rod

0