Early Bird discount display?

  • esixtyone
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 11 months ago #9544 by esixtyone
Early Bird discount display? was created by esixtyone
Hi,
Is there an option to show the earlybird discount and earlybird cutoff date in the event properties table? (just above the location row would be ideal....)
Ideally I'd have this auto hide after the cutoff date, but not important.

I can't see how to do this...

Thanks!
Ben.

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

More
12 years 11 months ago #9597 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Early Bird discount display?
Hi Ben

Unfortunately, right now, this feature is not available yet , I will consider adding this feature as a config option in the next release. For now, if you want to show the information, you will have to edit the code yourself. The file needs to be modified is components/com_eventbooking/views/event/tmpl/default.php .

Regards,

Tuan

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

More
11 years 11 months ago #15642 by rrcg
Replied by rrcg on topic Re: Early Bird discount display?
Hi Tuan,
can you give us the code and exact position necessary to display the early bird discount date after the early bird price?

e.g. 500$ until 20-06-2012

Regards,

Frank

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

More
11 years 11 months ago #15648 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Early Bird discount display?
Hi Frank

You will need to know Joomla / PHP programming (or find someone to help you) to do this task. I can only tell you :

1. The files you need to modified is

- components/com_eventbooking/views/category/tmpl/default.php
- components/com_eventbooking/views/event/tmpl/default.php

2. To get the early bird date, you can use the code :
Code:
<?php echo $item->early_bird_discount_date ; ?>

3. To display the discounted price, you can use the command :
Code:
<?php echo $item->discounted_price ; ?>

If you know coding, the information above should be enough to allow you do code modification. If not, then you will need to find someone to help you .

Regards,

Tuan

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

More
11 years 11 months ago - 11 years 11 months ago #15658 by rrcg
Replied by rrcg on topic Re: Early Bird discount display?
Hi Tuan,
thanks for your quick feedback.

I tried to implement the mentioned code - however I always get a blank page ..
Code:
<?php if ($item->discounted_price > 0) echo EventBookingHelper::formatCurrency($item->discounted_price, $this->config) ; echo JHTML::_('date', $item->early_bird_discount_date, $this->config->event_date_format, $param); else echo '<span class="eb_free">'.JText::_('EB_FREE').'</span>' ; ?>
Last edit: 11 years 11 months ago by rrcg.

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

More
11 years 11 months ago #15702 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Early Bird discount display?
Hi

Please attach the file you modified here (you need to zip it before attach) so that I can check your code. I believe it is simply a PHP syntax error.

Regards,

Tuan

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

More
11 years 11 months ago - 11 years 11 months ago #15714 by rrcg
Replied by rrcg on topic Re: Early Bird discount display?
Hi Tuan,
attachend you can find the defautl.php - as mentioned I addes line 201 to display the early bird date behind the early bird price.

Attachment default-20120529.zip not found



Frank
Attachments:
Last edit: 11 years 11 months ago by rrcg.

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

More
11 years 11 months ago #15744 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Early Bird discount display?
Hi Frank

There was a syntax error in the if command you added and I fixed it. Please get the modified file here, upload to your site and It should work well

Tuan

Attachment default-20120530.zip not found

Attachments:

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

More
11 years 11 months ago - 11 years 11 months ago #15774 by rrcg
Replied by rrcg on topic Re: Early Bird discount display?
Hi Tuan,
Thank you very much!
Frank
Last edit: 11 years 11 months ago by rrcg.

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

More
11 years 11 months ago #15775 by rrcg
Replied by rrcg on topic Re: Early Bird discount display?
Hi Tuan,
thank you very much. I customized it and it looks good so far.
Any ideas about how to get rid of the time statement (00:00)?



Greetings
Frank
Attachments:

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

Moderators: Tuan Pham Ngoc