Adding a link to the price button in the Category Grid Layout

  • Steve Vyse
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 months 3 weeks ago - 2 months 3 weeks ago #164296 by Steve Vyse
Tuan,further to my earlier ticket which you kindly answered I have successfully made changes to the Category Grid Layout with an override file at PATH_TO_TEMPLATE/html/com_eventbooking/eventgrid folder/default.php

With my template the event price is shown as a button which I wish to use as a link to the event details page - see the attached screenshot.

This is the bit of code in the Category Grid Layout php. 

{
?>
<div class="eb-event-price <?php echo $btnBtnPrimary; ?>">
<span class="eb-individual-price"><?php echo $item->priceDisplay; ?></span>
</div>
<?php} 

Looking at the code elsewhere that applies a link to the details page I see; 

<div class="eb-event-title-container">
<a class="eb-event-title" href="<?php echo $item->url; ?>"><?php echo $item->title; ?></a>
</div> 

So I have tried various 'mashups' such as the following

 {
?>
<div class="eb-event-price <?php echo $btnBtnPrimary; ?>">
<a class="eb-individual-price" href="<?php echo $item->url; ?>”><?php echo $item->priceDisplay; ?></a>
</div>
<?php
}

 Which illustrates my non-existent PHP skills in that it throws a syntax error. Can you tell me where I am going wrong?

Regards

Steve
Attachments:
Last edit: 2 months 3 weeks ago by Steve Vyse. Reason: I had pasted the question and the line returns had been lost when I saved.

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #164303 by Tuan Pham Ngoc
Hi Steve

Better zip your file and upload it here. I will take a look at it to see why it throws the error and guide you to correct it

Tuan

Please Log in or Create an account to join the conversation.

  • Steve Vyse
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 months 3 weeks ago #164307 by Steve Vyse
Tuan,

thanks for the response. I have zipped up the file my tinkering has broken!

Regards

Steve
Attachments:

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #164320 by Tuan Pham Ngoc
There is just a small error in the code. The original code is:
Code:
<a class="eb-individual-price" href="<?php echo $item->url; ?>”><?php echo $item->priceDisplay; ?></a>

It needs to be changed to:
Code:
<a class="eb-individual-price" href="<?php echo $item->url; ?>"><?php echo $item->priceDisplay; ?></a>

It is just one character different. ” need to be changed to "

Please make the change and check the result

Regards,

Tuan
The following user(s) said Thank You: Steve Vyse

Please Log in or Create an account to join the conversation.

  • Steve Vyse
  • Topic Author
  • Offline
  • New Member
  • New Member
More
2 months 3 weeks ago #164330 by Steve Vyse
Tuan,

thank you so much. I was going mad trying to understand what I had done wrong!

Regards

Steve

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #164367 by Tuan Pham Ngoc
No problem Steve. Please continue setting up the extension. If you have questions or need help, please don't hesitate to ask us

Regards,

Tuan

Please Log in or Create an account to join the conversation.