Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm making a website where I want to be able to sell a course (using commerce) in some weeks over the year.
I want to show a calendar on the products, using product displays and referencing to the product (where the date is, not in the product display).
When I see the calendar I get the title and the days of the course properly, but the link of them is referred to the administration of the product, and not to the product display,
hope somebody can help me!
greetings
cirk
Comment | File | Size | Author |
---|---|---|---|
#4 | scr.png | 41.88 KB | jcir |
#11 | fullcalendar-1393274-11.patch | 521 bytes | tim.plunkett |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedIn the fullcalendar settings of a fullcalendar view is a fieldset named "customize fields".
In the list you can select "rewrite url".
You can use that to refer to a field that contains the link to the product display.
Comment #2
jcir CreditAttribution: jcir commentedHi,
Thank you for the answer.
I tried that, but it still refers to the product admin, and not to the product display.
I also tried to put another field than the date in first place of the fields (the title), but didnt change anything either.
I don't know if It is a bug or not, but it keeps just pointing at the product anyways
Comment #3
aspilicious CreditAttribution: aspilicious commentedCan you provide some screenshots of the views settings and a link to the calendar? because It should work. I just retested everything.
Comment #4
jcir CreditAttribution: jcir commented- link not working -
Comment #5
aspilicious CreditAttribution: aspilicious commentedHmm I see some changes on your site :).
But the warning on top is something nasty...
Notice: Undefined index: path in fullcalendar_prepare_events() (line 228 of /var/www/cooking/sites/all/modules/fullcalendar/theme/theme.inc).
This is caused by
This means the commerce entities are doing something "special" with $uri.
I'll have to install commerce to verify this.
Comment #6
aspilicious CreditAttribution: aspilicious commentedOk I installed the commerce kickstart module together with latest fullcalendar_dev and I get the correct results
1) Add Content: title, Content: path, and (Reference product) date as fields.
2) Go to settings, rewrite url and choose "content:path"
Thats it :)
ps: I don't get those red notices you have.
Comment #7
jcir CreditAttribution: jcir commentedWow,
thank you very much, or dank je well :)
I just get one more error but I should find out why this happens
The path that its taking is this one: cooking/%3Fq%3Ddisplays-all-courses
but I wanted only the second part: displays-all-courses
(I actually want more than one display so just puting the pat to displays-all-courses wouldnt be the solution)
(and thats why I think I still get those red errors...)
(Im also using the last dev version of fullcalendar)
thanks again!
Comment #8
aspilicious CreditAttribution: aspilicious commentedI think you should turn clean urls on. That should fix part maybe all your issues.
Anyway I mark this issue as fixed.
Comment #9
jcir CreditAttribution: jcir commentedFixed the part of the link,
In the Views part.
FIELDS
Content: Path (Path)
I had to put in the Use absolute link (begins with "http://")
Enable this option to output an absolute link. Required if you want to use the path as a link destination (as in "output this field as a link" above).
But I couldnt fixed the red part.
Notice: Undefined index: path in fullcalendar_prepare_events() (line 228 of /var/www/cooking/sites/all/modules/fullcalendar/theme/theme.inc).
Comment #10
jcir CreditAttribution: jcir commentedthanks for the help and the good work aspilicious
:)
Comment #11
tim.plunkettI read the docs on entity_uri() and noticed that it can return "NULL if the entity has no uri of its own".
So this is a bug, and this should fix it.
Comment #12
tim.plunkettSmall mistake in the patch, I had = instead of :.
But I tested this, and it looked good.
http://drupalcode.org/project/fullcalendar.git/commit/ebf3579
Comment #13
jcir CreditAttribution: jcir commentedThanks!!
it's working perfect with the new version (I'm using by now the dev version 7.x-2.x-dev)
(with the 2.0-beta2 it gives warnings, so kepts with the dev one)