Veniqa icon indicating copy to clipboard operation
Veniqa copied to clipboard

Allow add to cart and checkout without login / signup

Open connecteev opened this issue 4 years ago • 6 comments

This is pretty basic for any ecommerce store (like Shopify) - I should be able to purchase an item without having to create an account or log in

connecteev avatar Feb 23 '20 21:02 connecteev

Thanks. We will be working on this shortly.

smaharj1 avatar Feb 27 '20 16:02 smaharj1

Any updates on this?

gfyre avatar May 05 '20 06:05 gfyre

Any updates on this?

We will try to get to it as soon as we can but due to other commitments and day job of all the devs, it will take some time for this. Feel free to grab this issue and raise a PR. Also, are you looking for a certain form of e-commerce implementation?

smaharj1 avatar May 06 '20 05:05 smaharj1

@smaharj1 I'll try to work on this and submit a pull request for the same. But I dont think I'll be able to complete it soon. However, I'll surely give it a shot.

gfyre avatar May 06 '20 06:05 gfyre

@smaharj1 @Viveckh I have changed the add-to-cart flow a bit where when a new (non-existing) user clicks on add-to-cart, the pathname of the page is saved to localstorage and once they have signed-up or signed-in, they will be pushed back to this very page.

This is working but I cannot submit a pull request because I have made way to many changes to the UI and some to the backend.

gfyre avatar Jul 31 '20 11:07 gfyre

@Viveckh or @smaharj1 one of you can submit a pull request. Here's the code:

  1. In shopping-webclient/src/components/product-detail/ProductDescription.vue:

Right under: https://github.com/Viveckh/Veniqa/blob/80feecfca638f2dded0538908b29ca7c42670f68/shopping-webclient/src/components/product-detail/ProductDescription.vue#L109

add var Url= window.location.pathname;

and under this line:

https://github.com/Viveckh/Veniqa/blob/80feecfca638f2dded0538908b29ca7c42670f68/shopping-webclient/src/components/product-detail/ProductDescription.vue#L110

add

localStorage.setItem("Url", Url)

And lastly,

under https://github.com/Viveckh/Veniqa/blob/80feecfca638f2dded0538908b29ca7c42670f68/shopping-webclient/src/components/registrations/LoginComponent.vue#L117

add

this.$router.push(localStorage.getItem('Url'));

Now if you are not signed in, the product page you were on is stored in your browsers localstorage and once you have signed in, you will be redirected to the product page you were on.

gfyre avatar Jul 31 '20 11:07 gfyre