Struggling to upgrade to 0.7

leehughesleehughes Member
in General edited October 2010
Hi,

I have the site http://www.princessgowns.co.uk/ with a product page http://www.princessgowns.co.uk/fc-test-1/

I'm not a code person but I have this my best attempt before I got lost..

I was following http://wiki.foxycart.com/v/0.7.0/upgrading.

I have changed my header code (wordpress user) and i'm now using the code
<!-- BEGIN FOXYCART FILES -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"; type="text/javascript" charset="utf-8"></script>
<script src="http://cdn.foxycart.com/YOUR_STORE_DOMAIN/foxycart.complete.js"; type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="http://static.foxycart.com/scripts/colorbox/1.3.9/style1_fc/colorbox.css"; type="text/css" media="screen" charset="utf-8" />
<!-- END FOXYCART FILES -->

With my store added were needed..

But now i'm lost, i'm no longer getting the pop up effect when I add to cart. I checked my product page and I have the code
<div class="buy-now">
					<form class="foxycart" action="https://princessgowns.foxycart.com/cart"; method="post" accept-charset="utf-8">
in there but I don't see or can't figure how how to replace this to update

Also the JSON is now not working due to the upgrade, the code for this is
<a href="https://princessgowns.foxycart.com/cart?cart=view"; id="fc_edit_link">Edit Cart</a> <a href="https://princessgowns.foxycart.com/cart?cart=checkout"; id="fc_checkout_link">Check Out</a>

I'm not sure if this needs changing either..

Any help would be amazing.. thanks :)
Comments
  • fc_adamfc_adam FoxyCart Team
    @leehughes, your store domain is "princessgowns", no ".foxycart.com" after it. At the moment the foxycart.complete.js isn't actually loading. Fix that one up and see how you go.
  • Ahh sorry missed that one..

    Pop up is now working (and a lot faster! )

    Still can't get the JSON to work though .. new code is ..
    <a href="#" class="fc_link"><strong>View Your Cart</strong></a>
    	<div id="fc_cart">
    		<img src="<?php bloginfo('template_directory'); ?>/images/cart.jpg" alt="Your cart" title="Your cart"/>
    		<h2>Your Cart</h2>
    		<div class="fc_clear">
    		</div>
    		<table>
    			<thead>
    			<th>item</th>
    				<th>qty</th>
    				<th>price</th>
    				</thead>
    			<tbody id="cart_content">
    			</tbody>
    		</table>
    		<a href="https://princessgowns/cart?cart=view"; id="fc_edit_link">Edit Cart</a> <a href="https://princessgowns/cart?cart=checkout"; id="fc_checkout_link">Check Out</a>
    		<div class="fc_clear">
    		</div>
    	</div>
    	<?php } ?>
    </div>
    
  • brettbrett FoxyCart Team
    Nice work for not being great at HTML. There's a lot of room for improvement, but it works, and that's the most important part.

    On your fc-test-1 page it looks like you have some images missing, but that doesn't seem to be impacting your FC stuff. Just a heads up though on that, in case it's indicative of deeper problems.

    As far as the "view your cart", give that an href actually pointing to your cart. That's something that was changed in v0.7.0+, so it relies on the href and not the class anymore. So you'd need an href of "https://YOURDOMAIN.foxycart.com/cart?cart=view";

    But that's not the bulk of your issue. I'll let @fc_adam take a deeper look, but do you know where the "mini-cart" script actually should be? I'm not seeing any javascript that'd call that (using fc_json or fc_BuildFoxyCart or anything from v0.6.0).

    To confirm: You're wanting/expecting a cart to slide down from the top of the page? Or something else?
  • Nice work for not being great at HTML
    ??

    I'm not a developer.

    The cart is not dropping down no, it was working with 0.6.

    Test page http://www.princessgowns.co.uk/dzage-tes/ (updated)

    The script is in the includes folder of wordpress.. i.e Link

    This was working with 0.6 but my question is simply, I have tried to upgrade and I can't get the drop down to work.
  • brettbrett FoxyCart Team
    Sorry if I was unclear. I meant to compliment you on what you've accomplished, especially considering that you don't call yourself a developer. Sorry if I misunderstood or insulted you. Not my intent at all.

    Thanks for the link to the script. That's the missing piece. Replace (or make a new file) with this:
    http://pastie.org/1233505
    And call that on your page. I did a quick test in Firefox and it works. Haven't cross-browser tested or anything, so let us know how it goes.
  • Hey Brett, no worries..

    It's the problem with the internet, can't tell tone of voice :) no harm done :)

    I did copy it though from your wiki section :)

    I have replaced the js with the new one you provided. My new problem though is how to call that in the code, I'm a bit confused.

    Will the upgrade to .71 be a complex as this (for me) or much more simple?

    Cheers Brett
  • brettbrett FoxyCart Team
    From v0.7.0 to v0.7.1 will be completely (100%) painless, as there's nothing you actually have to do at all unless you want to take advantage of the new features.

    As far as how to call it: Just include the js file in your template _after_ the foxycart.complete.js file and you should be good to go ;)

    Let us know how it goes.
  • Hi again,

    I re-read the wiki for JSON and it says that to call the JSON I need https://example.foxycart.com/cart?output=json&cart=view

    Is this talking about the same thing? I have this twice in my code
    <a href="https://princessgowns/cart?cart=view"; class="fc_link"><strong>View Your Cart</strong></a>
    	<div id="fc_cart">
    		<img src="<?php bloginfo('template_directory'); ?>/images/cart.jpg" alt="Your cart" title="Your cart"/>
    		<h2>Your Cart</h2>
    		<div class="fc_clear">
    		</div>
    		<table>
    			<thead>
    			<th>item</th>
    				<th>qty</th>
    				<th>price</th>
    				</thead>
    			<tbody id="cart_content">
    			</tbody>
    		</table>
    		<a href="https://princessgowns/cart?cart=view"; id="fc_edit_link">Edit Cart</a> <a href="https://princessgowns/cart?cart=checkout"; id="fc_checkout_link">Check Out</a>
    		<div class="fc_clear">
    		</div>
    	</div>
    	<?php } ?>
    </div>
    

    to no avail, sorry for my confusion.. i'm a little fish in a ocean with this ;) Almost there though ;)
  • fc_adamfc_adam FoxyCart Team
    edited October 2010
    @leehughes, those links are just to bring up the cart and the checkout with the current cart. The code that Brett gave you can just be pasted just before the
    </head>
    
    inside a
    <script type="text/javascript></script>
    
    tag. So your header will look like this:
    ...
    <script type="text/javsacript">
    ... Brett's pastie ...
    </script>
    </head>
    <body...
    

    Also, you need to fix up those links you pasted too. Anything related to foxycart needs to be princessgowns.foxycart.com, so for example your edit cart link needs to be
    <a href="https://princessgowns.foxycart.com/cart?cart=view"; id="fc_edit_link">Edit Cart</a>
    

    Give that a try and see how you go.
  • apologies for making this drag on but I have followed your steps and I still can not get it to work (mac chrome)

    I have put my header into a txt file which you can see at this link

    I have also contacted the person who coded this for me to see if there's something else going on rather than my stupidity :P ;)
  • fc_adamfc_adam FoxyCart Team
    @leehughes, It looks like the code that Brett pasted wasn't quite copied over correctly, there is a little bit missing that is causing an error. Try and copy that over again into your included file.

    Also, there is one line in Brett's code that you'll need to remove. Search for the word "console" in the javascript Brett posted and remove the line that starts with "console".

    Let us know how you go!
  • I have done what you said and copied the code again into a file and uploaded into my includes folder with the lines removed.. getting same results though

    The drop down is not working and when I click view your cart i'm getting a webpage is not available error

    testing on this page http://www.princessgowns.co.uk/dzage-tes/
  • fc_adamfc_adam FoxyCart Team
    @leehughes,

    So the webpage is not available error is because your links to foxycart still aren't correct. You just have
    https://princessgowns/cart...
    
    , they need to be
    https://princessgowns.foxycart.com/cart...
    
    .

    The javascript is still missing the same bit - weird! We should be able to fix that manually though. Find where it says "// BEGIN DO NOT EDIT" in the document. Just before that, it says
    for (i=0;i
    
    . That should be
    for (i=0;i<FC.json.products.length;i++) {
    
    . Replace and save and hopefully that's it!
  • Hi Adam,

    I have made the changes and everything.

    I also have the links to foxycart as they need to be, here is a screenshot for some reason it's not updating.. I'm still getting https://princessgowns/cart?cart=view that link.

    I have refreshed and tried different browsers thinking it was a cache issue and even went incognito and tried it but still the same
  • fc_adamfc_adam FoxyCart Team
    @leehughes, my apologies, I shouldn't have put a period at the end of the code you were meant to copy. Remove the period from the end of
    for (i=0;i<FC.json.products.length;i++) {
    

    I see that some of the links have updated in you're code. You haven't done all of them yet though. In your screenshot there is one at the top of the code panel there. You're getting very close lee!
  • thanks god for that!

    All working! I'm off for a lie down!

    Sorry I totally missed the other .foxycart.com link (d'oh!)

    Ok, I think i'm upgraded fully to 0.7.. Can I upgrade to 0.71 now? Do I simply change the store verison to 0.71?

    I will do taking advantage of the new features since I'm a UK user.. is there any docs yet for 0.71 ?

    Thanks :)
  • fc_adamfc_adam FoxyCart Team
    There shouldn't be any issues upgrading to 071 for you.
Sign In or Register to comment.