Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Shopping Cart? I know that's ridiculous...

 
Reply to topic    Forum Index » Suggestions View previous topic
View next topic
Shopping Cart? I know that's ridiculous...
Author Message
scottdallas



Joined: 04 May 2006
Posts: 1943
Location: US

Post Shopping Cart? I know that's ridiculous... Reply with quote
Just tell me no this would be too hard or impossible so I can get it out of my head. I'd really love a shopping cart integration of some sort.. something to let users bookmark what they're looking at and go back to it later almost like the $bookmark plug in.. even if it wasn't necessarily a shopping cart. How hard would that be. Think I could achieve that with XFields? Probably not huh... but it seems cutenews.ru has cookies down pat with all the [not-logged] and [if-logged] commands.. so it would just be a little extra adding and tweaking wouldn't it?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Jun 09, 2006 12:45 pm View user's profile Send private message Visit poster's website AIM Address
Guest








Please login to hide the ads.

scottdallas



Joined: 04 May 2006
Posts: 1943
Location: US

Post Reply with quote
I figured out a way integrating PayPal check it out:



http://www.paypalshirts.com



It's still a work in progress but I utilized the code from PayPal and put XFields in them and now I can set the values for PayPal right in CuteNews 'Add' section. If anyone is interested I'll post my code here. It's general code so anyone can utilize it and change the values to their information.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Mon Oct 09, 2006 1:32 am View user's profile Send private message Visit poster's website AIM Address
ksen



Joined: 04 Jun 2006
Posts: 142

Post Reply with quote
Hey hey hey Very Happy i see ur using the gallery with CSS ### style Very Happy



It looks grt!! I defintely wudnt mind seeing how u integrated the paypal cart into it!! So go ahead post the code here Smile
Mon Oct 09, 2006 3:55 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1943
Location: US

Post Reply with quote
Thanks Wink I realllllly enjoy the css gallery stuff.. you don't know how long I've wanted to be able to use that. Those are 33%, I think I like that better cause IE and FF work and there's less gap on the right side.



Anyway for paypal I took their free merchant shopping cart 'add to cart' button that you make with the wizard and changed it to this (this is the code that creates the 'add to cart' button on your site):



Code:
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><input type="hidden" name="add" value="1"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="business" value="payments@scodal.com"><input type="hidden" name="item_name" value="{title}"><input type="hidden" name="amount" value="[xfvalue_price]"><input type="hidden" name="no_shipping" value="2"><input type="hidden" name="return" value="http://www.paypalshirts.com/afterpaypal.php"><input type="hidden" name="cn" value="Additional Instructions?"><input type="hidden" name="currency_code" value="USD"><input type="hidden" name="lc" value="US"><input type="hidden" name="bn" value="PP-ShopCartBF"></form>




Things to notice:



Code:
<form target="paypal"




That's going to make it open a new window instead of keep them on your site. So make an <iframe> with an id=paypal and bam now it won't come up in a new window, now it shows up wherever you want it in your page cause it targets your iframe with id=paypal Wink (If they push add to cart twice it opens in a new window anyway, not sure why.. )



Just replace all the variables in that code that you'd like to be able to edit in your 'add news' page... Here are my xfields/cutenews variables and my code:



Code:
<input type="hidden" name="item_name" value="{title}">


This makes the {title} of your post the name of your PayPal shopping cart item.



Code:
<input type="hidden" name="amount" value="[xfvalue_price]">


Obviously this is going to match up with where you type in your price in the 'add news' page. Make an XField for 'price' but don't put $'s in it! Just numbers like 12.99.



That's it! But as you can see, since that's in your template.. there are lots of things you could substitute with XFields.. like paypal email address or something.. I'd suggest going and creating your own PayPal shopping cart and not using my code up there. Then change it how you like. One thing to fix right off the bat through is that when you get the 'add to cart' code.. they have all the code broken on seperate lines for each peice of code and it creates a HUGE vertical gap on your page when you put it in your site. Smush everything together like I have it above and that won't happen anymore.



Last thing I did I kinda mentioned above but on the page of your full story item or wherever you have the add to cart button you need an iframe with an id=paypal (or whatever you may have changed it to in your PayPal add to cart code). I made mine width=800 height=500 or something and I plan to make the initial iframe page a CSS gallery of 3 or 4 posts in my cutenews database that way when it isn't the shopping cart it's at least some more clickable content (with target=_top in all of the href's so they don't load inside the iframe and look retarded). Make sure you have scrollbars on too so they can adjust their shopping cart if they're going nuts and about to spend like 40 bazillion. Also, it wants to know where to bring them AFTER payment.. that's kinda cool cause you can have a nice little page to pop up in the iframe after they finish paying that matches your site perfectly. Visitors never leave site, you get money, they feel comfortable doing the dealing right in paypal on your site!



If you have shipping on your items.. be sure to adjust that in your PayPal merchant area. I liked how the flat shipping rate worked.. something like:



1-5 items = $this much

6-10 items = $this much

etc



It will adjust accordingly.. it's so good.



The end.



(Next comes the 'view cart' button but I'm sure it's quite similar..)

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Mon Oct 09, 2006 5:57 pm View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:    
Reply to topic    Forum Index » Suggestions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.