only display Virtuemart products based on registered login - joomla

We are trying to setup a simple BTB site to support our retailers (somewhere they can download product text/images and corporate branding). We are using Joomla 1.5.2 and Virtuemart 1.1.9
We want it to be completely secure (unregistered viewers - and competition - just see simple intro page, and login with option to register). Not any content at all.
And we also also want to use VM registration for registering new users.
I set up the secure access for categories/products using Joomla menu items pointed to virtuemart categories, and set the menu item access to "registered". Worked perfect, user not logged in, don't see anything but splash page. Logged in, all of the product categories were available via the menu items.
But we just realized this messes up user registration. We want to use Virtuemarts user reg so we don't have to gather all of that data (address info, etc.) and come back and enter by hand.
Apparantly, with the virtuemart menu items set to "registered" access, the user gets redirected to joomla's registration page(which doesn't gather the data we need into Virtuemart). I've pasted a valid VM registration url everywhere I could find in the backend login files (com_user and mod_user), but no luck (didn't think that would work, im a beginner).
Anyone know if there is a workaround? Or a better way to do this?
Thank you.

I can you tell with absolute certainty that you'll need to make a minor adjustment in the VM code if you want to do this. The hurdle is that VM uses the same menu Item ID as it's default throughout the script, so even if you create a different menu item for the registration, it's always going to fall back to the first one that you had.
The only way around this is a small hack in the VM function that always forces this to happen. Put the below code at the very beginning of function getShopItemid() located in ps_session.php somewhere around line 459. Leave all the existing code in place, but this needs to run before that does.
/*Hack For multiple VM menu itemids, if there is a page specified, find THAT Itemid */
global $page;
if($_REQUEST['Itemid']) {
$_REQUEST['shopItemid'] = $_REQUEST['Itemid'];
} elseif($page) {
$db_hack = new ps_DB;
$q = "SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart' AND published=1 AND params like '%page=".$page."%'";
$db_hack->query( $q );
if( $db_hack->next_record() ) {
$_REQUEST['shopItemid'] = $db_hack->f("id");
}
}
Once this is in place, you'll need to have a Joomla menu item that includes at least this:
option=com_virtuemart&page=shop.registration
With that menu item in the database, the above code will find the menu item for that page, and use that one instead of the default VM method. The Joomla security will trigger as you expect because it has the correct menu item.

Related

Joomla External Link -

I am using the external link type menu items within Joomla - the reason is I need to link direct to an anchor on another page from the menu.
I have around 10-15 links, all work as expected except 2.
in my external URL box I have something like this:
"index.php?option=com_content&view=article&id=10&Itemid=207#SystemIntegration"
id - is the article id
Itemid - is the menu item I want to be active
hashtag - is my anchor link
PROBLEM:
On the 2 that are not working it seems to go to url with this "http://www.website.com/component/content/?Itemid=207#SystemIntegration" instead of "http://www.website.com/services/digital-solutions/SystemIntegration#SystemIntegration" as expected
has anyone else had this issue? I have a feeling its connected to the SEF urls being on.
Joomla 3.5.0 version
Step1. Create a Hidden Menu from Joomla admin==>Menus==>Manage==>add
new menu
Step2. Select a Hidden Menu ==> add a new menu item==>Menu Item
Type==>Article==>single article==>your article id==>save
Step3. Site load this url(take copy)
Step4. Create a new menu from external url Pate the previous url
(include #)
Nothing I tried worked reliably - so I got round it by making each item go to the single article, then using a spare field to store the name of anchor. Then within some custom JS code I checked if the field was set and automatically scrolled the page to it if it was - works better than the joomla standard anyway and is more reliable

Filter courses on Moodle 2.7

I am wondering if there is any plugin available for Moodle 2.7 which allows admin to add some attributes to courses and create a widget to filter the courses by thoses attributes.
For example, we would like to allow users to filter courses by their price, content, dates etc.
Thanks in advance
The block gnuwings provided will actually solve your issue when configured within Moodle correctly.
What you should do afterwards, is enable the 'My Moodle' page for every user. To find this setting, you should use the search function for the site admin.
My Moodle allows you to place blocks in the center of the screen, so you can edit the default My Moodle page to show this block. I would personally recommend turning the feature that allows students to edit their own My Moodle page off, as this will make it harder for you to manage this page in the future (without modifications to the database).
To edit the default 'My' page, in Moodle 2.7, go to site administration, appearance, default my page.
To enable this view by default, go to site administration -> appearance -> navigation, and update the value of 'Default home page for users'.

Joomla 3.2 Guest user group

I'm working on a website based on Joomla 3.2.
I created menu module with a menu item called login and I want that this menu item only is shown to guest users. The item is suppose to disappear as soon the user is logged in.
To achieve that I gave that menu item, the access level guest. In the past I have done something like that on Joomla 2.5 already and it worked but now it doesn't work at all.
The only hint I could get was to change the default user groupe for guest users from public to guest, but still no success.
I hope someone can help me to figure out this problem.
In Joomla 3 you have Public and Guest user groups. Public is what you want for all pages and items that anyone can see.
For items that just non logged in users see you need to assign them to Guest. Which a user will not then see.
This how to for 3.1 is quite good
http://www.inmotionhosting.com/support/edu/joomla-3/extension/hide-module-after-login
When you perform all steps, and it's still not working. Then logout, clear browser cache/session data etc and then try again, this worked for me

Joomla ACL: Only allow access to custom component in the backend?

I'm building a component for the backend. I don't want the users who will access it to access ANYTHING else in the backend except for this component.
I tried following these two instructions:
http://www.aclmanager.net/blog/general/31-how-to-add-basic-acl-support-to-your-extension
http://docs.joomla.org/Developing_a_Model-View-Controller_%28MVC%29_Component_for_Joomla!1.6_-_Part_14#Describing_the_ACL
I made a new User Group with a parent of public and allow admin login (which would lock them out of everything) and then tried adding the ACL code from those links above with permissions to create and edit but I just get a blank screen (not even a logout link). The "Debug Permissions Report" showed the correct permissions but nothing's showing up.
Any ideas? My next step is to manually go through every component and not allow access to that new User Group but it seems like there's an easier way.
Thanks!
In Joomla! 2.5 we regularly create "Content" only backend users that have access only to the 'com_content' component.
Going back through our steps the only thing you haven't specified is adding the new user group to a View Access Level. If you're using the standard sample content installed when setting up a Joomla! website you can add your new user group to the "Special" view access (although any will do).
If a new group has 'admin login' privileges it can login but without a View Access level it can't see anything.. it's a subtle difference but it's the way Joomla! works.

Virtuemart 2.0 and user register

I'm using Joomla 1.7.3 and Virtuemart 2.0, everything works except the registration of users, in previous virtuemart this worked by default, but now I can not register new users, some clue about the problem?
There are two things happening.
In VM 2.0 there is some XML missing that allows you to specify a link to a registration form - if you use the account maintenance option it gets a slightly different page (see this thread on the VirtueMart 2.0 forum). This is already fixed in the prerelease version 2.0.1b and hides some unwanted fields.
To link to the correct page you should use a Joomla! menu type of System Links -> External URL and set the Link field to:
/index.php?option=com_virtuemart&view=user&layout=editaddress
The "Please enter your name." means that the field is defined in VM2's configuration as Required. I believe the problem occurs because neither the Account Maintenance or the link I provided above give the user a chance to enter a user name. The work around is to point them to a standard Joomla! registration page and then when they checkout they can complete the rest of their details.
(In VM2 shoppers are standard Joomla! users so this is a perfectly acceptable way around it).
with the link you told me the problem is still happening, so I was to comment the line of user.php that making the validation in the method check()
if (trim($this->name) == '') {
$this->setError(JText::_('JLIB_DATABASE_ERROR_PLEASE_ENTER_YOUR_NAME'));
return false;
}
the value for this->name is empty, why??? with this lines comment, i can register and login on virtuemart....

Resources