Access virtuemart cart and shop for registered user only - joomla

Can i restrict the access permission for virtuemart cart and shop. It is my client requirement to show add to cart and user cart only for registered user and whenever any visitor try to get cart it will be redirected on login page.
have any possibility in virtuemart to fix access permission for non register user OR I should to change shop module code to restrict the access.
Need your suggestion very fast...
Thanks

As far as the cart is concerned, if you have it in a module then you simply need to set the access level to registered. For the cart flypage, you will need to set up a menu item for that page and set the access level to registered. The menu item can be in a hidden menu, it does not have to be displayed anywhere for this to work. As far as the add to cart button, You just need to make a modification to the theme, look for addtocart_form.tpl.php. You can put a simple conditional statement that displays a message if the user is not logged in. Here is a good example of using the user object in Joomla -
http://docs.joomla.org/Accessing_the_current_user_object
You could easily copy the example on this page for the add to cart form.

Related

I Can not view category without login

Nice to meet you all, sorry my english is bad.
I just wanna ask this question:
How to view product without login in Prestashop 1.7 ?
I try to click a category on my prestashop website without account login, but i can not view any products. Message is "You don't have acces to this category"
It looks like your categories access is limited by groups.
Go to Catalog->Categories, edit the required categories and select checkboxes with your customer groups. Save changes.
Check the screenshot:
http://prntscr.com/otwshc

Customize Magento checkout process

I have products with individual landing pages. I want the landing pages to contain everything needed to checkout with that product. This includes a dropdown to select the quantity of the product desired, shipping information and billing information. Is this possible? In default Magento, you can't get to the checkout process without first having an item in the cart.
Default Magento allows you to choose where to redirect after a product is added to cart: to the cart overview or back to the page where the "Add to Cart" button was clicked. Using a similar approach you can create an extension that overrides the 'addAction' method of the cart controller to redirect to the checkout page immediately after a product is added to cart.
You can't go to checkout with an empty shopping cart, but redirecting after the add to cart action allows customers to skip the cart page, if that is what you intend to achieve.
It is also possible to use the billing and shipping information the customer submits in the landing page for the checkout - your extension will have to validate it and save into the quote object as if it was submitted in the respective checkout steps.
Developing such an extension would not be a simple task - checkout is a very sensitive matter.

Magento redirect to product page after add to wishlist for user who is not logged in

Scenario:
When user is not logged in
What i want:
- When User click on wishlist
- Magento Redirect to Login Page
- After Successful login user need to redirect to recently used page i.e product page
What is happening:
- User redirected to dashboard after login
Your question is not clear.
But try this if you are searching for it.
You can change the setting in admin
System->Configuration->Customer->Customer Configuration->Login option
Change the setting Redirect Customer to Account Dashboard after Logging in to No.
There are also free extension available.
Thanks,
Your Question is clear and here is your Answer.
You can override the add to wishlist action in the wishlist controller and make it redirect to the referrer.
Override this method Mage_Wishlist_IndexController::addAction() and replace this:
$this->_redirect('*', array('wishlist_id' => $wishlist->getId()));
with this:
$this->_redirectReferer()

Missing Itemid on url at login pages

I'm on Joomla 2.5.
I created a menu item named "Login Form" with Itemid=626 . Also I created a menu item named "Article" with access level "Registered".
The Problem
When a user click on the "Article" menu item on the frontend, he goes to login page index.php?option=com_users&view=login I need this url to contain Itemid=626 so it could be index.php?option=com_users&view=login&Itemid=626
Please advise
I think you can't override standard joomla login page just creating a menu item.
To create easily some rules and redirect the users you can use this component, Chameleon.
If you don't need complex rules you can just auto redirect all users from standard login to your page.

How to find a Guest user cart details?

I want to get the Guest user cart details in magento.
Suppose a user comes to Magento site and add a product to cart.Then again come to same product and again he wants to add the product to cart.Now I want to check if the same guest user has already that product in the cart.
I am using following to get the guest user details$session=Mage::getModel('core/session');
using above code If I use print_r(session) then I get a visitor Id.
How Can I load the check out cart collection using this visitor ID to check If he already have that product in the cart.
To get the items stored in the cart you can use:
Mage::getSingleton('checkout/session')->getCart()->getItems()
Then you can loop over all the items and check wether the id is already there.

Resources