News:

Support the VirtueMart project and become a member

Main Menu

Need help with Ajax issue, virtuemart and third party plugin

Started by Anthweb, July 28, 2013, 14:53:25 PM

Previous topic - Next topic

Anthweb

Hi,

I'm using Joomla 2.5.9 along with virtuemart and a 3rd party payment plugin called pay plans. 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 currently have the view set up on the plugin parameters as cart, task as checkout and option as com_virtuemart. 

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.

Based on the virtuemart code 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

Theoretically I should be able to set task as "add" and this should work but it seems virtuemart is sending an 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.

Please email me at akaanth2@gmail.com if you can help resolve this issue along with your costs for the work.

Thanks,