Jump to content

Custom Add To Cart Module - Not Working With Logged In Users


tawalu

Recommended Posts

I've created a custom module that allows users to customize their item with a visual interface. After customizing there is a submit button that saves the customization using a jquery ajax post request to the item's url and then uses the jquery submit command to submit the form. The user is then taken to the shopping cart summary screen.

 

The module works as intended when a user is not logged into an account. However, if the user is logged into an account the customization information is saved, but the item is not added to the cart and the user is redirected to the store's homepage.

 

Is there something different about the way the add to cart submit function works when a user is logged in vs. a non logged in user?

Here is the js function I am using to handle the submission.

$.ajax({
	      url: URLOFITEM,
//Customization info as object
	      data : dataObject,
	      type : "post",
	      success: function(){
	      	//Adds to cart
	      	 $("#buy_block").submit();
	      }
	    });
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...