FitzwilliamMuseum / fitz-main-website

A simple Laravel front end for the production version of the Fitzwilliam Museum website.
https://fitzmuseum.cam.ac.uk
GNU General Public License v3.0
5 stars 1 forks source link

Feat/rembrandt donate btn #677

Closed ostafinskim closed 4 months ago

ostafinskim commented 4 months ago

https://studio24.zendesk.com/agent/tickets/14354

We’re are planning to publish a new page on Tuesday the 30th for the opening of a new display 'Rembrandt, Rubens, Van Dyck' which is now saved as a draft in the CMS.

Would it be possible to amend the copy on the button which pulls through in the top left of the page? – it currently says 'Book now' and links to the ticket page. But for this display, we need the button to read ‘Donate now’. And for it to link to the ‘Make a donation’ webpage in place of ticketing.

https://fitzmuseum.studio24.dev/plan-your-visit/exhibitions/rembrandt-rubens-van-dyck

sean-dunwoody commented 4 months ago

Thanks for the good description on this ticket @ostafinskim it's really helpful.

The changes look good to me. The only concern I have is whether the client might add a $exhibition['exhibition_url'] for the Rembrandt exhibition at some point? Doing so would break this functionality.

ostafinskim commented 4 months ago

Thanks for the good description on this ticket @ostafinskim it's really helpful.

The changes look good to me. The only concern I have is whether the client might add a $exhibition['exhibition_url'] for the Rembrandt exhibition at some point? Doing so would break this functionality.

Hi Sean,

I have had the same concerns, however I am not too sure about how this can be achieved other way, as this needs to work only on the one particular url ( slug ) and it's beyond my control as customer sets it up in CMS. 🤔

I am happy to edit this to make it more bullet proof.

sean-dunwoody commented 4 months ago

Hi @ostafinskim ,

I think this would work:

@if ($exhibition['slug'] == 'rembrandt-rubens-van-dyck')
    <a href="{{ url('support-us/make-a-donation') }}" class="cta-btn">
        Donate now
        @svg('fas-chevron-right', ['width' => '16px', 'height' => '16px', 'color' => '#fff'])
    </a>
@elseif(!empty($exhibition['exhibition_url']))
    <a href="{{ $exhibition['exhibition_url'] }}" class="cta-btn">
        Book now
        @svg('fas-chevron-right', ['width' => '16px', 'height' => '16px', 'color' => '#fff'])
    </a>
@else
    <p class="cta-btn">Tickets available soon...</p>
@endif

Basically you check for the Rembrandt exhibition first, and then after that you fallback to the previous default behaviour.

ostafinskim commented 4 months ago

Hi @sean-dunwoody,

Thanks for this.

I have updated this PR.

sean-dunwoody commented 4 months ago

Thanks Miro, that all looks good to me now 👍