- Posts: 9
- Thank you received: 0
Adding a link to the price button in the Category Grid Layout
- Steve Vyse
- Topic Author
- Offline
- New Member
Less
More
10 months 1 week ago - 10 months 1 week ago #164296
by Steve Vyse
Adding a link to the price button in the Category Grid Layout was created 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
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
Last edit: 10 months 1 week 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.
- Tuan Pham Ngoc
- Offline
- Administrator
10 months 1 week ago #164303
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Adding a link to the price button in the Category Grid Layout
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
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
Less
More
- Posts: 9
- Thank you received: 0
10 months 1 week ago #164307
by Steve Vyse
Replied by Steve Vyse on topic Adding a link to the price button in the Category Grid Layout
Tuan,
thanks for the response. I have zipped up the file my tinkering has broken!
Regards
Steve
thanks for the response. I have zipped up the file my tinkering has broken!
Regards
Steve
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
10 months 1 week ago #164320
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Adding a link to the price button in the Category Grid Layout
There is just a small error in the code. The original code is:
It needs to be changed to:
It is just one character different. ” need to be changed to "
Please make the change and check the result
Regards,
Tuan
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
Less
More
- Posts: 9
- Thank you received: 0
10 months 1 week ago #164330
by Steve Vyse
Replied by Steve Vyse on topic Adding a link to the price button in the Category Grid Layout
Tuan,
thank you so much. I was going mad trying to understand what I had done wrong!
Regards
Steve
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.
- Tuan Pham Ngoc
- Offline
- Administrator
10 months 1 week ago #164367
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Adding a link to the price button in the Category Grid Layout
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
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.