- Posts: 10
Feature Requests
Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.
Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.
Course Module links to product in store
- Christoph Bohner
- Topic Author
- Offline
- New Member
-
Less
More
10 years 2 weeks ago #1
by Christoph Bohner
Course Module links to product in store was created by Christoph Bohner
Hey,
I would like to link the courses in the joomdle course module to the corresponding product in the store (j2store).
At the moment I am formatting the string (course name) to the site alias and link this to this site. That works, but it's an ugly solution.
Is there a variable I can use? Any better way?
My code (in default php):
$sitealias = $curso;
if(strpos($sitealias, ' ') !== false){
$sitealias = str_replace(" ","-","".$sitealias."");
}
if(strpos($sitealias, '.') !== false){
$sitealias = str_replace(".","-","".$sitealias."");
}
if(strpos($sitealias, '(') !== false){
$sitealias = str_replace("(","","".$sitealias."");
}
if(strpos($sitealias, ')') !== false){
$sitealias = str_replace(")","","".$sitealias."");
}
$lasturlpart = strtolower("".$sitealias."");
echo "<li><a $target href=shop/".$lasturlpart.">".$curso."</a></li>";
Thank you!
Christoph
I would like to link the courses in the joomdle course module to the corresponding product in the store (j2store).
At the moment I am formatting the string (course name) to the site alias and link this to this site. That works, but it's an ugly solution.
Is there a variable I can use? Any better way?
My code (in default php):
$sitealias = $curso;
if(strpos($sitealias, ' ') !== false){
$sitealias = str_replace(" ","-","".$sitealias."");
}
if(strpos($sitealias, '.') !== false){
$sitealias = str_replace(".","-","".$sitealias."");
}
if(strpos($sitealias, '(') !== false){
$sitealias = str_replace("(","","".$sitealias."");
}
if(strpos($sitealias, ')') !== false){
$sitealias = str_replace(")","","".$sitealias."");
}
$lasturlpart = strtolower("".$sitealias."");
echo "<li><a $target href=shop/".$lasturlpart.">".$curso."</a></li>";
Thank you!
Christoph
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
10 years 2 weeks ago #2
by Antonio Durán
Replied by Antonio Durán on topic Course Module links to product in store
Isn't there a j2store products module that you can use for this? I have not checekd...
Please Log in or Create an account to join the conversation.
- Christoph Bohner
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 10
10 years 1 week ago - 10 years 1 week ago #3
by Christoph Bohner
Replied by Christoph Bohner on topic Course Module links to product in store
I don't know any j2store module & I need to select the category of the moodle course.
I have different joomdle course modules with based on different moodle course categories.
I have different joomdle course modules with based on different moodle course categories.
Last edit: 10 years 1 week ago by Christoph Bohner.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
10 years 1 week ago #4
by Antonio Durán
Replied by Antonio Durán on topic Course Module links to product in store
I am sorry, but I don't understand what you mean.
The module I was thinking about would be this one:
j2store.org/extensions/modules/product-display-module.html
The module I was thinking about would be this one:
j2store.org/extensions/modules/product-display-module.html
Please Log in or Create an account to join the conversation.
- Christoph Bohner
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 10
10 years 1 week ago #5
by Christoph Bohner
Replied by Christoph Bohner on topic Course Module links to product in store
I'm sorry. I was not clear.
I can't find the possibility to filter the courses in the product-display-module (j2store) by the categories from moodle.
I have a mulitlanguage website. In moodle I have a category "german" and a category "english".
On my website I want to show all courses of category "german" on my german site and all courses of moodle category "english" on my english version of the site.
In fact there are some more moodle categories, but I hope you are able to understand that example.
With the joomdle module "joomdle courses" I am able to filter by the moodle categories - that's why I'm using that solution at the moment.
Thank you!
I can't find the possibility to filter the courses in the product-display-module (j2store) by the categories from moodle.
I have a mulitlanguage website. In moodle I have a category "german" and a category "english".
On my website I want to show all courses of category "german" on my german site and all courses of moodle category "english" on my english version of the site.
In fact there are some more moodle categories, but I hope you are able to understand that example.
With the joomdle module "joomdle courses" I am able to filter by the moodle categories - that's why I'm using that solution at the moment.
Thank you!
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7909
10 years 1 week ago #6
by Antonio Durán
Replied by Antonio Durán on topic Course Module links to product in store
Ok, I understand it better now.
However, I don't see a "good" way to do it right now.
With other shop components, you can have products in multiple categories, so you could just map Moodle english and german categories to shop categories, and filter by those.
In J2store you cannot do that, so that option is not good.
I think the best way here would be to modify joomdle courses module, to allow it to link to products in shop also, as it does with course details and Moodle pages.
I will try to take a look soon and get back to you. I guess you can wait a bit, as you have a working solution, even if it is not ideal.
However, I don't see a "good" way to do it right now.
With other shop components, you can have products in multiple categories, so you could just map Moodle english and german categories to shop categories, and filter by those.
In J2store you cannot do that, so that option is not good.
I think the best way here would be to modify joomdle courses module, to allow it to link to products in shop also, as it does with course details and Moodle pages.
I will try to take a look soon and get back to you. I guess you can wait a bit, as you have a working solution, even if it is not ideal.
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
10 years 1 week ago #7
by Chris
Replied by Chris on topic Course Module links to product in store
Another solution, perhaps not one you hoping for ....
How often do your courses and categories change? If not frequent, just build a custom module displaying the courses you want and use advanced module manager to display based on language. If the the language of the front end is germany only display the module for german.
If your categories are changing often then this would be an administration issue.
How often do your courses and categories change? If not frequent, just build a custom module displaying the courses you want and use advanced module manager to display based on language. If the the language of the front end is germany only display the module for german.
If your categories are changing often then this would be an administration issue.
Please Log in or Create an account to join the conversation.
- Christoph Bohner
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 10
10 years 1 week ago #8
by Christoph Bohner
Replied by Christoph Bohner on topic Course Module links to product in store
Hi & thanks,
I hope to have a lot of courses to sell, so there are a lot of new courses and categories...
My workaround is fine for the moment, but it's pretty ugly, so every new idea is welcome
I hope to have a lot of courses to sell, so there are a lot of new courses and categories...
My workaround is fine for the moment, but it's pretty ugly, so every new idea is welcome
Please Log in or Create an account to join the conversation.