News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

i would like to display a VM page only to registred users.

Started by extonjaez, December 07, 2016, 12:24:09 PM

Previous topic - Next topic

extonjaez

Hello,

Today this URL page of my site is displayed to the public users
https://www.ignition.ws/component/virtuemart/by,%60p%60.product_sku/dirDesc/results,21-70?Itemid=0
And i would like to display this page only to registred users.
Which change i must do and where ?
(because my VM Component is Linked to a Menu Item with registred Group assigned (then i don't understand zhy the Urlis public...), see this picture joint :
http://www.screencast.com/users/extonjaez/folders/Default/media/a6f0e5fe-bb23-4e44-b7bd-7577ea28fe98
Many Thanks for your help
Arnaud




System Information
VirtueMart 3.0.18.5
PHP Built On    Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
Database Version    5.1.73-1+deb6u1
Database Collation    latin1_swedish_ci
Database Connection Collation    utf8_general_ci
PHP Version    5.5.38
Web Server    Apache
WebServer to PHP Interface    cgi-fcgi
Joomla! Version    Joomla! 3.6.4 Stable [ Noether ] 21-October-2016 16:33 GMT
Joomla! Platform Version    Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent    Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

K&K media production

make template overrides for category, productdetails, ...

add this to the top of the files:

$user = JFactory::getUser();
if ($user->guest) {
     $message = "YOUR ERROR MESSAGE";
     JFactory::getApplication()->redirect("index.php", $message, "error");
}

extonjaez

Quote from: K&K media production on December 07, 2016, 18:04:24 PM
make template overrides for category, productdetails, ...

add this to the top of the files:

$user = JFactory::getUser();
if ($user->guest) {
     $message = "YOUR ERROR MESSAGE";
     JFactory::getApplication()->redirect("index.php", $message, "error");
}


At the top of which files ?
Many Thanks for your help
Best Regards
Arnaud

GJC Web Design

over ride the default.php of each of the views mentioned and add the code
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

Hi extonjaez,
Le prpbleme est que vous avez une langue, il faut faire de même pour toutes les langues.
The URL https://www.ignition.ws/component/virtuemart/by,%60p%60.product_sku/dirDesc/results,21-70?Itemid=0 is because this is the english result and you have set only for french the menu links.
Try to add link to shop root and/or category "0" for all language with register restriction and the shop should be protected from anonymous access(products and manufacturer view too).