Community Forums 

Main Content

nocart and small shopping cart on page

    Apr 20 2014 21:09:04

    #1

    cassie75

    Join date : 2008-09-18      Posts : 273

    After an illness I am getting back to sorting out my sites. Have already posted 2 questions I have come across.

    Next one is my site which uses nocart to keep people on the page and also has some sort of script to show the cart on the page in the corner. Cant remember where i got it or how it works.

    Anyway - I just changed a page to not use nocart so that the return link in the cart takes you back to the same place on the page using bookmarks (requested by customer) and the "cart on page" doesn't work properly.

    Any idea?

    The page I have changed is here
    http://www.craft-kits.co.uk/stitch-m-xmas.htm

    A page I have not changed is here
    http://www.craft-kits.co.uk/stitch-m-littledog.htm

    Sure it is something simple but can it be fixed?

    Life is too short to work 8 hours a day - thats why I work 16 :-)




    Apr 21 2014 08:43:59

    #2

    GT

    Join date : 2008-09-18      Posts : 3207

    First Cassie, I'd fix all page errors:
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.craft-kits.co.uk%2Fstitch-m-xmas.htm

    Next, I'd use my show cart scrit:
    http://www.malsforms.com/display-cart.html

    After that, you need to read my page about return a buyer to an anchor:
    http://www.malsforms.com/returntoananchor.html

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Apr 21 2014 09:59:59

    #3

    cassie75

    Join date : 2008-09-18      Posts : 273

    Thanks GT - i knew i would get a blasting from you about the errors :-(

    A lot of them are because it was done with Frontpage and uses Exts which I know have gone and the site will be redesgned soon using Expression Web which should fix some.
    Some I see is just me being lazy and not checking the code :-)

    I actually thought I had used your script - really cant remember where I got it so I will get that done asap. I assume that your mini cart does not use nocart or I am no further forward.

    And thanks for answering the original question and confirming we can't use anchors (or bookmarks as FP calls them) and nocart.

    I think the page is sooooo long that I need the return to anchor so customers don't get lost and give up.

    Life is too short to work 8 hours a day - thats why I work 16 :-)




    Apr 21 2014 18:32:53

    #4

    cassie75

    Join date : 2008-09-18      Posts : 273

    Ok - fixed some of the errors.

    Added your script to a test page. The view source link doesn't work with IE - had to use Chrome - no biggy.

    ignored the anchor bit at the moment - just want the script to work.

    Script works but only if someone clicks the "continue shopping". If they click the producturl link in the cart it does not work show items in cart on page.

    Is there a work around? Seems to be doing the same as the script I have already.

    Life is too short to work 8 hours a day - thats why I work 16 :-)




    Apr 22 2014 07:46:46

    #5

    GT

    Join date : 2008-09-18      Posts : 3207

    View source works in all of my browsers, you might be using a old unsecure version of IE.

    I'M STILL SEEING A # IN YOUR CODE:
    <input type="hidden" name="return" value="www.craft-kits.co.uk/stitch-m-xmas.htm#H33">;

    I don't see my script used.
    http://www.craft-kits.co.uk/stitch-m-xmas.htm

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Apr 23 2014 11:16:32

    #6

    cassie75

    Join date : 2008-09-18      Posts : 273

    I don't like testing new things on live pages just in case they don't work :-(
    The test page is
    http://www.craft-kits.co.uk/cart2.htm

    Not sure why the # in the code is a problem - i will still need to use anchors/bookmarks if I use your code as I need customers to jump back down the page.

    Perhaps it might be easier jut to forget the small cart and not use nocart. It might be better for customers to see the cart after a purchase and get back to the same place rather than see the small cart.
    What do others prefer?

    Life is too short to work 8 hours a day - thats why I work 16 :-)




    Apr 23 2014 12:02:40

    #7

    Geoff

    Join date : 2008-09-18      Posts : 415

    The minicart script you are currently using comes from http://www.gemasana.com/mals and as far as I can tell seems to be working fine in the URLs in your first post

    There is no problem using # for page anchor returns when using a form.

    As you have discovered, if "Append cart content vars" is checked in cart set up, return will go to page anchor if NOT using "nocart". However if using "nocart" the page will refresh to the top. This is something I'm sure Mal could look at. See https://www.mals-e.com/viewtopic.php?id=19833&mid=19833&fid=2 for a previous explanation.

    If "Append cart content vars" NOT checked, return will go to page anchor whether using "nocart" or not. However you need "Append cart content vars" checked for a minicart to work.

    With regard to using "producturl", the minicart will not update because the cart contents querystring (vars) is not appended to the URL. This is also something to address to Mal.



    Apr 23 2014 15:31:18

    #8

    cassie75

    Join date : 2008-09-18      Posts : 273

    So it sounds like my best option is to go for the no frills approach and not use the mini cart or nocart options. Just plain old normal cart and use the anchors.
    I will see if mal would look at this but the mini cart is not his so he would only look at the nocart option i guess.

    Life is too short to work 8 hours a day - thats why I work 16 :-)




    Apr 23 2014 18:17:54

    #9

    Geoff

    Join date : 2008-09-18      Posts : 415

    You can still have your minicart but with the provisos in my last post.

    This is the way I understand it -

    1. Keep your minicart with "nocart" and accept that firstly the page will refresh to the top and secondly, clicking the "producturl" link will not update the minicart.

    2. Keep your minicart, not "nocart" but going straight to the cart and the "Continue shopping" button will return to the page anchor, but again, clicking "producturl" will not update the minicart.

    Alternatively...

    3. Forget the minicart, uncheck "Append cart content vars" in setup, and "nocart" will refresh to the page anchor.

    By the way, Mal's input would not be with the minicart script but rather having the "producturl" link append the querystring, and having "nocart" refresh to a return page anchor with "Append cart content vars" checked in setup.