Topic-icon Virtuemart Login

Active Subscriptions:

None
7 years 4 months ago #60336 by mardal
Virtuemart Login was created by mardal
in my site I have installed the Source Coast JFB Connect who implements automatic Joomla Login whith Social account.
All works fine whith indipendent SClogin module at top left on my site, but in virtuemart cart login, there are not show Social connection!!!!
How can i Fix this problem? Requires some special configuration to work with virtuemart?
Thanks.
The topic has been locked.
Support Specialist
7 years 4 months ago #60339 by mel
Replied by mel on topic Virtuemart Login
Virtuemart does not have a 1-click integration with JFBConnect like some other 3rd party extensions. However, adding the social login buttons from JFBConnect should be relatively easy.

In /components/com_virtuemart/views/cart/tmpl/default.php, this file displays the login form on the VM cart page. You should do a template override of this page and add the {JFBCLogin} Easy-Tag on the page, perhaps with some description text:

For VM 3.0.16, I added it right after the call for showing the login form at line 47:
echo shopFunctionsF::getLoginForm ($this->cart, FALSE,$uri);
echo '<h2>Or Login with Social Networks:</h2>{JFBCLogin}';

It would look like this
File Attachment:


Of course how you display it can be tweaked but that should help get you started.

-Melissa
The topic has been locked.
Active Subscriptions:

None
7 years 4 months ago #60349 by mardal
Replied by mardal on topic Virtuemart Login
Hi Melissa, my VM version is 3.0.18
I have edited from FTP my /components/com_virtuemart/views/cart/tmpl/default.php file, an i have only add your code in new line 51, as you have me show.
47 <?php
48 $uri = vmURI::getCleanUrl();
49 $uri = str_replace(array('?tmpl=component','&tmpl=component'),'',$uri);
50 echo shopFunctionsF::getLoginForm ($this->cart, FALSE,$uri);
51 echo '<h2>Oppure esegui il Login con i Social Networks:</h2>{JFBCLogin}';
52
53 // This displays the form to change the current shopper

But non show the social login, don't go.
Can you hel me?
Tks
The topic has been locked.
Support Specialist
7 years 4 months ago #60356 by mel
Replied by mel on topic Virtuemart Login
That code looks right to me. Can you provide me a specific URL of the page you're looking at? It might be a different view file that needs to be edited. If I can't figure it out from that, you can also PM me FTP access to your site (using the envelope icon under my avatar).
The topic has been locked.
Active Subscriptions:

None
7 years 4 months ago #60380 by mardal
Replied by mardal on topic Virtuemart Login
Hi Melissa,
The template has already an override for this file (templates/name_template/html/com_virtuemart/cart/default.php) so I have add the code in that file, but don't go!
I think it is better to add it to the login form sublayout (templates/name_template/html/com_virtuemart/sublayouts/login.php) so it can be displayed also on all the virtuemart pages that display the login form.
Can you help me?
Tks,
Marisa
The topic has been locked.
Support Specialist
7 years 4 months ago #60381 by mel
Replied by mel on topic Virtuemart Login
The template has already an override for this file (templates/name_template/html/com_virtuemart/cart/default.php) so I have add the code in that file, but don't go!
If the code is not showing up in the view, then the code might also be in the incorrect file. I tried accessing FTP with updated credentials but am still unable to log in.
I think it is better to add it to the login form sublayout (templates/name_template/html/com_virtuemart/sublayouts/login.php) so it can be displayed also on all the virtuemart pages that display the login form.
When I was testing out the Easy-tag on VM to find the right template file, I tried the login file. However, I couldn't get it to show in that file. Hence, I why I suggested the cart file.

-Melissa
The topic has been locked.
Support Specialist
7 years 4 months ago #60382 by mel
Replied by mel on topic Virtuemart Login
Thank you for the updated credentials.

When the cart is empty, there is a separate block of code that was being executed than the one where you put the JFBCLogin easy-tag. I also added the same line of code to the block at the end of the file that executes when the cart is empty. You should be able to see the buttons when you're not logged in, regardless of what's in the cart now. From there, you should just need to style it, etc but the buttons are present.

-Melissa
The topic has been locked.
Active Subscriptions:

None
7 years 4 months ago #60383 by mardal
Replied by mardal on topic Virtuemart Login
Thank you Melissa, but I disagree. Sure, The button has now been added, but users can only use it for logging in case of a pre-registered user.
I think it could be used to register user in the site, taking some fields from social networks and adding the missing ones, thereby facilitating user registration.
It should appear as you entered it in your image by clicking the "Registrer" button on the top right:

File Attachment:
The topic has been locked.
Support Specialist
7 years 4 months ago #60384 by mel
Replied by mel on topic Virtuemart Login

The button has now been added, but users can only use it for logging in case of a pre-registered user.

This is not correct. If the user has not logged in with the social credentials before, a new user will be created and logged in when one of the social buttons is pressed. They will behave the same as the SCLogin module to create a user if not existing or to log in if there is one mapped. If you have the 'Social Profiles - Virtuemart' plugin enabled and configured with the profile fields mapped to VM fields, the data will be imported into the correct VM fields.

It should appear as you entered it in your image by clicking the "Registrer" button on the top right:

The image shown in my original response was working with the layout file that is included with VM. I didn't add the login form, just the social buttons, which I have done for your file. Since you've already overwritten the HTML for the page, it has been customized to your site and not standard with VM. You can either 1) take the portion of code from the top of your default file that adds the Joomla username/password form and add it to the bottom when the cart is empty or 2) instead of showing the JFBCLogin easy-tag, embed the instance of the SCLogin module on the page using the Joomla loadposition tag.
The topic has been locked.
Active Subscriptions:

None
7 years 4 months ago #60385 by mardal
Replied by mardal on topic Virtuemart Login
Hi Melissa, I have added line151 in /domains/my_site.com/public_html/templates/my_templates/html/com_virtuemart/sublayouts/login.php and now it seems go very well.
Can I know what file and what line have you modified? (and in what directory) ???
Tks
The topic has been locked.