Need task and view infor for Virtuemart to restrict access to certain members

Started by Anthweb, July 26, 2013, 19:11:22 PM

Previous topic - Next topic

Anthweb

Hi, I need the task and view information for Virtuemart that will allow me to restrict access for certain members from reaching their shopping cart. I'm using Joomla 2.5.9 along with virtuemart and a 3rd party payment plugin similar to akeeba subscribtions. I'm trying to set up a subscription site where paying members can view the store and purchase products but non paying members and site visitors can view the store but can't access their cart until they pay for a membership. I have a third part plugin that works with my subscription software and I'm able to get it to redirect members when they click on checkout. I have the view set up on the plugin parameters as cart, task as checkout and option as com_virtuemart. 

However, I need to change the view and task so that when they click on Add to Cart button, that they get redirected to the sign up page. Not when they click on checkout. The reason being that by the time the click on checkout, they filled out all this information to order the products for nothing and only to get redirected to a sign up page again. I would like to know what to change the view and task to in order for it to work the way I described above. I'm willing to pay for any plugins if needed. Please get back to me as soon as possible.

Thanks,

Anthony




[attachment cleanup by admin]

PRO

inside the add to cart form is this

<input type="hidden" name="view" value="cart"/>
      <noscript><input type="hidden" name="task" value="add"/></noscript>


views/productdetails/default_addtocart.php

Anthweb


Hi,

Thanks for the info. I running into an issue when I set task as add. It seems virtuemart is sending ajax request and its not possible to redirected in between ajax request without knowing how virtuemart handles ajax response. Please let me know exactly how I can redirect a user when they click on add to cart button since payplans plugin can not intercept ajax response.

Thanks,

PRO



PRO

for me,
it would be easier to change the add to cart button to a link based on the user.

thats because I dont know how the plugin works.

any coder that was paid could do this,
but this takes work, and if its not regular learning VM stuff, or a plugin that I use, I cannot do it.

It would be easy for the actual plugin maker to do this, so they might do it the cheapest