Module: Shopping Basket and Paypal
Glooper
Joined: 2005-09-21
Posts: 225 |
Posted: Sun, 2009-08-30 06:50 | |||
Latest module is attached installation and user information can be found at : http://codex.gallery2.org/Gallery3:Modules:basket This version was posted on 30 August 2010 new to this version - Paypal IPN and order tracking. There are 3 statuses for an order 1. Awaiting Payment (red) - this will stay awaiting payment until either the admin confirms payment or paypal sends it IPN message to confirm that CC payment was successfull. - Side bar integration, Basket contents appears on the sidebar. Benjamin Albert Smith - Photography
|
||||
Posts: 27300
Ben,
Thanks for the contribution! I don't need a cart but lots of other people do.
There is some code re-factoring that will happen soon and some code is going to change a bit, but if your module(s) are in git hub than we will make the changes for you. So make your life easier the sooner it in in your repository it will go smoother.
I will create a codex page for some documentation and hopefully somebody that test/uses your module will help out with the docs.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 225
It should be in github. I uploaded it last night..
Benjamin Albert Smith - Photography
Posts: 27300
Cool thanks
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 155
Great Glooper, I have install it, the the settings is nice and simple, however when I clicked back to gallery all albums and images were not displayed, only different colour ban at the top of the screen. I realize it is not finished, but I would like to do some testing with feedback to its functionality. I downloaded the module from your posting. Do I miss something?
Thans wbarek
Posts: 225
What version of g3 are you using.. it's probably because of a version mismatch?
I think they've done a lot of changes over the weekend so not sure if it will work with the latest version.. and this was done after beta 2 so maybe some problems with running on that..
I'll have a go later at getting it working with the tip of the github trunk..
Ben
Benjamin Albert Smith - Photography
Posts: 225
Unfortunetly I can't seem to install the tip of the trunk version at the moment... comes up with the following error?
Failed to create tables in your database:The used table type doesn't support FULLTEXT indexes
I'm guessing there's a lot of work still being done (unless this is an unsupported windows issue )
Ben
Benjamin Albert Smith - Photography
Posts: 155
Thanks Ben, yes I installed latest code today from nightly experimental so the mismatch is probably the cause. I am leaving for a month of photo shoot in Canadian wilderness so I will not be able to check any updates until I get back.
wbarek
Posts: 225
Ok.. managed to install.. had to delete line 278 from the install.sql script in installer (FULLTEXT KEY...) . also the comma on the line before.
Did a few changes to the module and it now should work with the latest build.. You'll have to get the latest build of g3 from github
I've attached the new version to this message.
Cheers
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben,
I have just installed you new version and unfortunately it has no effect. You can check my site:
http://williambarek.com/g3/
Thanks William
Posts: 225
Hmm.. I'm not sure..
can you check your log files..
they are under var/logs directory from the root directory. There should be a log file with todays date... hopefully it will have an error in there.
Are you using your own theme?
Ben
Benjamin Albert Smith - Photography
Posts: 155
No, I am using standard theme, just now I have disabled basket and gallery is back. Here are the errors from the log file;
Posts: 225
I think I found the problem... a schoolboy error on my part!
I've attached a new version... I'm a bit worried I've made the same mistake elsewhere in my code so let me know if you have any other problems.
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben, sorry but it is the same.
wbarek
Posts: 225
oh poo... I'll keep looking... I'll let you know if I work it out!
sorry about this...
Ben
Benjamin Albert Smith - Photography
Posts: 225
Ok I have it... and this time I promise it will work! I set up a second test environment to work it out... and of course it was a windows issue! Stupid non case sensitive names!
Anyway
Fixed and working in the attachment.. Sorry to keep messing you about!
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben, no problem I am glad that I my small way I can contribute to your guy's effort. Yes, it is now working as you can see (http://williambarek.com/g3/ I have added 2 prints to the basket and it works. I presume you will be implementing some of the things you have mentioned in the announcement?
How will the shipping info and charges be implemented? Will it be done through PayPal setup?
Thanks for the good work
William
Posts: 155
Ben, just exploringI have tried ad a product and noticed that it ads it to the top, shouldn't it ad it to the bottom of the list. What would be really nice is to make items on the list movable or reordering to the desired position.
The I tried to submit the basket to pay by PayPal and it came back telling me that it couldn't be processed because of the incorrect e-mail for PayPal. I checked my configuration and it was correct. Now I am not sure how it works. If a non-registered customer comes and wants to make a purchase, shouldn't Paypal ask for his account or card info?
Since I tried to make the purchase and payment from both registered and non-registered login, I got the same error:
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.
Thanks William
Posts: 225
Excellent.
When buying using the offline option then currently information about shipping addresses is required.
When buying using paypal then you are requested shipping information, when entering credit card details. There's some info on this on the paypal website
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_paypal_shopping_cart#id08AEBI00JL7
I'm not sure how to implement shipping charges yet. You wouldn't expect to pay a fixed amount per item bought. but if a customer bought a large poster and a small print then the shipping would have to be for the large poster... but then also if they bought 50 4x6's then the shipping would be more than say 1 4x6... So I'm not really sure what pricing model for shipping would be best... Any ideas would be welcome..
Ben
Benjamin Albert Smith - Photography
Posts: 225
William,
I think you need a merchant paypal account... will just check now... in the meantime have a look at the posters on my website (see below) and start to buy one... you should see a paypal cart... this is similar to the one that will show with this gallery module and works in the same way.
Yeah.. you need a Premier account to be able to sell online. check your paypal account settings and see if you can upgrade.. you will probably need to be verified with your bank.. (I have vague recollections of doing this in the past). It's all free though.. they charge you a small percentage per transaction (which is less than most merchant bank account fees!)
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben,
Thanks for both your notes, I do have a merchant account with PayPal, I have been using it with my G2 gallery, you can check it out:
http://williambarek.com/g2/
From there I get the proper screen with PayPal, so what I think is that something is not passing correctly from G3 basket to get the error I am getting from PayPal. I am sorry I have to end this dialog because have to get ready for my one month photo-shoot up in Northern Ontario and have to leave quite early. I don't think I will have too many opportunities to get connected, but I will try. If not I am sure lot of things will change in a month.
Thanks again
William
Posts: 225
Just had a look and compared both sites. I think you have your paypal account setting wrong in the configure setting. That should be the email address of you paypal account (which is probably the same as your normal e-mail address). I think you currently have that set to the title of your shop.. I think maybe the configuration screen could be a bit clearer. I'll work on that for the next version
Ben
Benjamin Albert Smith - Photography
Posts: 4
I've installed this module but I see no settings for it at all .. it is active running G3 Beta 2
These are the only type of references I see in the log file for basket ... and the css file does appear to be in the folder within the css folder.
2009-09-13 18:21:05 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:21:10 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:21:13 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:21:15 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:21:37 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:21:43 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:21:55 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:22:14 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:28:25 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:29:40 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:29:44 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:29:47 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:30:04 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:34:28 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:34:31 -04:00 --- error: missing file (css): basket.css
2009-09-13 18:34:34 -04:00 --- error: missing file (css): basket.css
Posts: 225
Unfortunetly it doesn't work with Beta 2... It was programmed on the github version which has had lots of changes since beta 2..
When beta 3 is out I will make sure that it up to date and working..
Ben
Benjamin Albert Smith - Photography
Posts: 4
I could just go install the github version... thanks for the info! been a while since I've checked out the gallery project
Posts: 225
No need no.. Beta 3 is just out.. and as promised here's a new version of the shopping cart module.
Let me know if there are any problems (I'm sure there will be as my test environment is not the best! ).
I've added the ability to override products for certain galleries and even individual items
Cheers
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben, since I couldn't disable basket via module updates, I simply removed the code from the server and yes that fixed the detail view, which is fine. So the code of your module is the culprit - any ideas on how to fix it?
Thanks William
Posts: 225
not sure to be honest.. I don't understand how the upgrade stuff works..
Try just installing the module again and re-enabling maybe it will recreate the table.. if that doesn't work.. then if you have SQL access on the database then you try running the following sql commands.. to manually create the tables.
CREATE TABLE IF NOT EXISTS {product_overrides} (
`id` int(9) NOT NULL auto_increment,
`item_id` int(9) NOT NULL,
`none` BOOLEAN default false,
PRIMARY KEY (`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS {item_products} (
`id` int(9) NOT NULL auto_increment,
`product_override_id` int(9) NOT NULL,
`product_id` int(9) NOT NULL,
`include` BOOLEAN default false,
`cost` INTEGER(9) default -1,
PRIMARY KEY (`id`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
If you don't have SQL access then let me know and I'll write you a quick upgrade script. that you can install and use to upgrade.
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben, I have reinstall your module and it now appears. However, when I click on the link add to basket - nothing happens and the basket stays empty. Well, at least some progress made. Thanks w
http://williambarek.com/g3/
Posts: 225
I think that is the old version of the module.. if you now disable it... download the latest zip file... install and re-enable.
Also check your log file under var. It might have a clue as to what's going on.
Ben
Benjamin Albert Smith - Photography
Posts: 225
Just to prove it's working! I've just set it all up correctly on my test environment with the default gallery theme.
http://www.gatephotography.co.nz/next/index.php
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben,
Where is the latest module? This one I downloaded this morning from official git modules site. Here are the entries from log:
2009-09-15 15:15:48 -04:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL error: Table 'willkcom_gallery3.g3products' doesn't exist - SHOW COLUMNS FROM `g3products` in file system/libraries/drivers/Database/Mysqli.php on line 142
2009-09-15 15:18:18 -04:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL error: Table 'willkcom_gallery3.g3products' doesn't exist - SHOW COLUMNS FROM `g3products` in file system/libraries/drivers/Database/Mysqli.php on line 142
2009-09-15 15:29:39 -04:00 --- error: Uncaught Kohana_Database_Exception: There was an SQL error: Table 'willkcom_gallery3.g3products' doesn't exist - SHOW COLUMNS FROM `g3products` in file system/libraries/drivers/Database/Mysqli.php on line 142
Thanks William
Posts: 155
Ben, I am sorry, just went to the site and THERE IS NO BASKET VISIBLE???
Can you please include the latest version when posting?
William
Posts: 225
I have no idea what version would be in the git hub modules.. I don't think my latest code has been pulled by the admin of it so I'm not sure how it works.
my latest version of the module is linked in this thread.. I updated the link in the initial post and on my post on Mon, 2009-09-14 05:06
so disable the current module. uninstall it. Download the one here.. install and the enable.. and it should work... fingers crossed..
Ben
Benjamin Albert Smith - Photography
Posts: 225
barek.. no basket is visable until you add to it!... that was one of the changes I made... didn't see the point of adding the empty basket to a page... click on a photo and add to basket and it will appear
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben, IT IS GREAT IT WORKS NOW !! Good work and I will explore and test it some more and if I have any suggestions I will post them. Perhaps this version should be placed what they have there, this could be so confusing.
Thanks William
Posts: 225
Yay! :D
Benjamin Albert Smith - Photography
Posts: 225
Added documentation at http://codex.gallery2.org/Gallery3:Modules:basket
Benjamin Albert Smith - Photography
Posts: 155
Ben, I am glad that the basic modules works, I have tested and purchased my own print. However, I think that 2 things would be nice to have;
1) shipping cost (customized to several choices)
2) charging taxes (again customized by several choices)
This could be done in similar way as you done with the ability to add and modify your print options)
I don't see this option on PayPal and I think it would be nice for them to handle just total cost that includes print+shipping+taxes.
Any comments Thanks William
Posts: 7994
I've pulled the latest code into github. Sorry for the delay! Glooper, feel free to shoot me an email any time you want your stuff pulled.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 27300
Thanks! makes everybody s life better.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 155
Ben, I have explored basket module further and noticed that in the "product list" set up, I couldn't delete a product at all. I could edit add new one but couldn't delete any of the original 3 entries. However, when I added new one there was no problem to delete it. Is it a bug or feature?
Suggestion, it would be nice to order entries manually. Since I believe it sorts it by numerical value, when for example you add 11x14 it puts it before 4x6 or 8x10.
Thanks William
Posts: 225
@bharat - no probs. I'll make sure to drop you an e-mail next update I do
@floridave. No probs
@wbarek -
I'll look into tax and shipping costs. I'll have a look to see how the g2 one did it... (if it did?)... the problem is that I'm not sure how to work out shipping costs. How would you envision the shipping costs being calculated?
I noticed the deletion problem the other day.. I think all rows to a table added during installation are added with different database access.. will investigate at some point to work out.. or perhaps I'll just add one example entry.
There's no actual sorting going on.. I think it's just how it comes from the database.. I'll investigate how to add sorting to it at somepoint
Cheers
Ben
Benjamin Albert Smith - Photography
Posts: 8
Thanks for making this, really nice so far!
________________________________________________________
G3 Beta install at www.frodo.net
G2/G3 Facebook newsfeed app at http://bit.ly/hBNlC
Posts: 155
@wbarek - Ben,
I have looked at other sites to see if there is any way to come with some formula. It is a complex problem, shipping cost of course will depend on the location of the gallery. I like your table for setting the product cost and perhaps shipping could be implemented in a similar fashion, i.e: creating entries in the same table
product1| charge | domestic shipping reg mail | international | domestic UPS | international UPS | domestic Fedex | International Fedex |
Owners will have to find out and estimate cost and fill fill accordingly, of course there could be another option to use flat rate, which I think is not that good, it either charges too much to the customer or it looses money to the shipper.
I think this would work fine except when one is shipping multiple products. I tried to make some sense from sites when I selected multiple products and it seems that they using some percentage of total cost to calculate the shipping cost. Whether or not this method reflect the real cost I am not sure.
I think perhaps true formula would be to take size x weight for different services (post, UPS, Fedex) which is how they calculate the cost anyway.
In this way your product table will have to have: product cost - product size - product weight
These will be entered by the gallery admin, so it will take into account differences in services, packaging in different regions and countries.
At the end of the basket, the formula would take these into account and calculate the shipping.
Taxes are another matter and I will think about that next. Let me know what you think about this scheme and how difficult it would be to implement? William
Posts: 225
Cheers for the feedback...
I've still not had a chance to look into adding shipping yet... (Been too busy playing around with a Google's GWT/Gear uploader )... It was the Shipping multiple products that I'm worried about. It still seems like some kind of voodoo on how to work out shipping prices of multple products and multiple images!
With regards to tax though.. wouldn't that be something that you would include in your product prices anyway. It's only a problem if you are shipping to multiple countries.. therefore take off tax when exporting.. though I'm going on my limited knowledge of VAT in the UK and GST in NZ. Is tax in the states worked out differently? Or is it still a per item charge?
Ben
Benjamin Albert Smith - Photography
Posts: 27300
In some part of Canada they add provincial tax on top of the price + the federal tax. ($XX+5%)+7%
And other places they just add the provincial tax to the item and the federal tax to the item. $XX + 12%
Then were I live there is no provincial tax ($XX + 5%)
Very complex, good luck in supporting this negative discount.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 18
Haven't tried this out yet but I'm really pleased to see people building out modules for G3, and this module in particular. Thanks Gooper!
Posts: 225
well, judging by dave's response.. there's no way I want to sit down and learn how tax works in the states/canada! Until someone else who knows more about it has a go at adding it, people will just have to add it themselves to the shown price. sorry!
Ben
Benjamin Albert Smith - Photography
Posts: 155
Ben, yes the tax is a complex one and I will look into it at the Canadian side, definitely in Ontario where I reside and post the info to see if it is doable.
In terms of shipping I am enclosing rates for Canadian letter mail. The second option is send it as a parcel (Canada Post)they didn't have a summarized table as for letters, they do it via web calculator. I will visit one of the post office to see if I can get something similar. As I see it it will be a combination of these variables:
size + weight + destination
So as long as people fill the values for these in the setup form, depending on their country of operation and their postal services.
I will do similar investigation for FedEx and UPS.
Thanks for your effort William
Posts: 155
Ben, as promised here is some info on taxes charged in Ontario. It is relatively simple for Ontario as you can see in the enclosed file. William