NOP 1.6 - not going to shopping cart after every purchase

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I am currently configuring NopCommerce 1.6 for a client. His hosting company does not support asp.net v4.0 - as yet only 3.5, so i can't use Nop 1.7 or 1.8

After a customer clicks on the add to cart button, i would like them to remain on the product page or the product list page. Is there a simple way to do this?

Any help much appreciated!!
13 years ago
Define easy... do you mean without recompiling the code? Cause, no... I don't think so. But if you want to crack open the code the sky is the limit.

Bascially there is one line that you would need to comment out and then the customer would stay on that page after post-back. This line is located on any page that has an add to cart button... ProductBox1.ascx.cs, etc.

It is located inside the btnAddToCart_Click method and looks something like this:

Response.Redirect(ShoppingCartUrl);

I don't know the exact wording in 1.60. All you have to do is comment this out and it will not take the customer to the cart every time.
13 years ago
bfranklin825 wrote:
Define easy... do you mean without recompiling the code? Cause, no... I don't think so. But if you want to crack open the code the sky is the limit.

Bascially there is one line that you would need to comment out and then the customer would stay on that page after post-back. This line is located on any page that has an add to cart button... ProductBox1.ascx.cs, etc.

It is located inside the btnAddToCart_Click method and looks something like this:

Response.Redirect(ShoppingCartUrl);

I don't know the exact wording in 1.60. All you have to do is comment this out and it will not take the customer to the cart every time.


Thank you very much!! As you can tell recompiling is new to me - which of the .dll files do i copy to my live site after i have recompiled the solution
13 years ago
The way that I do it is I check the BIN folder to see what .dlls have modified dates that match the current time that I last compiled... those are the ones that I upload.
13 years ago
bfranklin825 wrote:
The way that I do it is I check the BIN folder to see what .dlls have modified dates that match the current time that I last compiled... those are the ones that I upload.



Cheers - i assume that i should also copy up the ascx.cs files that i have changed as well
13 years ago
I do, but I'm not sure that you have to. The .dlls are what control everything... the code in the .cs files is compiled into those - I believe - but just for the heck of it I upload those too. But you can upload those WIHTOUT the .dlls and you'll find that no change have actually been made... I've done that before. :)
13 years ago
bfranklin825 wrote:
I do, but I'm not sure that you have to. The .dlls are what control everything... the code in the .cs files is compiled into those - I believe - but just for the heck of it I upload those too. But you can upload those WIHTOUT the .dlls and you'll find that no change have actually been made... I've done that before. :)



and finally.......i promise...........

what do you use to comment out a line in the ascx.cs file.   i have been using <!--   xxxxxxxxx  -->, but i am beginning to thing that i have got it wrong
13 years ago
uh... yeah... that's HTML comments... for C# you use this:

// text to comment out

two slashes... //... the text should turn green(?) in Visual Studio
13 years ago
Hello,

do you guys upload the individual files manually? I just right-click one the "NopCommerceStore" Project and say "publish"! It takes forever with Visual Studio compared to FileZilla or other FTP programs, but once this is done Visual Studio will only replace changed files the next time you publish through Visual Studio (and choose to keep local copies of the files in the Web Publish diaglogue). That's fast and I never wonder which file to upload.

You just need to save the ConnectionStrings.config that you have on your server and upload it manually after you published for first time (and keep it around just in case, because if you change your local ConnectionStrings.config, VS will think it's newer and replace the one that's on your server).

Any particular reason that I'm missing why you are doing it the hard way?
13 years ago
Hello All,

I am working with the most current version of nopCommerce (as far as I know) and have the same issue - a customer would like to be able to "add to cart" and then not re-direct to the cart page (IE stay on the same products page).

Do ya'll know if this is the most updated solution to this issue?

Is there an easier way to solve this?  

Thanks!

Alex
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.