Module: Shopping Basket and Paypal

halinab
halinab's picture

Joined: 2006-07-24
Posts: 43
Posted: Mon, 2010-12-20 07:00

I haven't updated the rest api but I have written more code for the WPG3 and worked with the rest api and rather than being read only its working fine on a test installation
see it working here http://www.halinasplace.net.au/wordpress/about/
I'm yet to update the info back to rest and the gallery - since I'm using the WP Simple Paypal Shopping cart to help with the basket - not sure how this will work with rest just yet but I'm getting there!

 
John_Stewart

Joined: 2010-06-22
Posts: 26
Posted: Thu, 2010-12-23 11:43

I've been using this module on my website for a few months now, and it's a great piece of work :)

The one thing on my wishlist now would be the ability to use promo/discount codes for good customers, and also to encourage new customers to spend more.

I would publish or email discount codes that customers could manually enter at the checkout stage. These codes would apply a discount on the total spend (excluding P&P) if their order exceeds a minimum value (which could be zero). This would involve building a table of discount codes, with a start date, end date (optional), minimum spend, discount percentage or a fixed discount amount (e.g. get $10 discount on orders over $150).

What would also be nice, but slightly more involved would be to also have a buy 3, get one free type offer. This would need to be set-up with a start date, end date (optional), product(s) the offer applied to, order quantity and free quantity. For example, if there was a buy 5 - get one free offer on 12x18 prints and the customer ordered 6 prints, they would only get charged for 5. If they ordered 14, they would get charged for 12, and if they bought 18, they would get charged for 15 and so on.

 
APe

Joined: 2010-05-30
Posts: 5
Posted: Sun, 2011-01-02 10:48
APe wrote:
Quote:
There is seems to be a problem with install procedure - attempt to activate it second time gives me this

2010-09-02 16:09:15 -07:00 --- error: exception 'Database_Exception' with message '#1060: Duplicate column name 'name' [ ALTER TABLE gd_orders ADD COLUMN `name` varchar(1024); ]' in zzzzz/gallery3/system/libraries/Database_Mysqli_Result.php:27
Stack trace:

Hello,
I have also this problem with RC2 and tried many times and with different basket.zip but nothing, when I activate the module and save changes the box return uncheked.

The message returned is a little bit different:

2010-11-20 23:42:59 -08:00 --- error: exception 'Database_Exception' with message '#1060: Duplicate column name 'postage_band_id' [ ALTER TABLE products ADD COLUMN `postage_band_id` int(9) default 1 ]' in ...../system/libraries/Database_Mysqli_Result.php:27
Stack trace:

I did not find an answer in the forum. Any idea?

Thanks a lot

APe

Solved but I don't know why. I just uninstalled all the modules I have from module page and reactivated all at the same time.
Now I have translated a little bit of the module in Italian but find that the confirm order page don't work. It seems a table in the database is missing... I search in the forum if I find something, if not I'll be back :-)

 
APe

Joined: 2010-05-30
Posts: 5
Posted: Sun, 2011-01-02 20:28

Well, I did some italian translation of this module but I cold not translate some text. For example "Shopping cart is empty", "Payment details", "Basket summary", "Delivery adress" and "contact detail". Is this text not translable?

Suggestion, when I add some photo to basket and I select the add button the dialog box remain and I have to close with the x on top right. The page is not refreshed and need to be refreshed manually to see the new photo added. For me this should require less clicks. Anyway the module is great. Thanks a lot!

I had some problem at the beginning because the table orders was not automatically created and this gave an error. A friend helped me with phpmyadmin and I cold create the table manually. Now the module seems to work exept that I can not display the waiting payments and I receive this error: Kohana_Exception [ kohana/core.errors.403 ]:
@todo FORBIDDEN

The log file show:
2011-01-02 12:17:47 -08:00 --- error: Kohana_Exception [ 403 ]: @todo FORBIDDEN
/home/httpd/vhosts/mysite.ch/httpdocs/foto/modules/gallery/helpers/access.php [ 194 ]
#0 /home/httpd/vhosts/mysite.ch/httpdocs/foto/modules/gallery/helpers/access.php(395): access_Core::forbidden()
#1 /home/httpd/vhosts/mysite.ch/httpdocs/foto/modules/basket/controllers/basket.php(124): access_Core::verify_csrf()
#2 [internal function]: Basket_Controller->show_order('910558aa77ab286...')
#3 /home/httpd/vhosts/mysite.ch/httpdocs/foto/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Basket_Controller), Array)
#4 /home/httpd/vhosts/mysite.ch/httpdocs/foto/system/core/Event.php(208): Kohana_Core::instance(NULL)
#5 /home/httpd/vhosts/mysite.ch/httpdocs/foto/application/Bootstrap.php(67): Event_Core::run(Array, Array)
#6 /home/httpd/vhosts/mysite.ch/httpdocs/foto/index.php(94): require('/home/httpd/vho...')
#7 {main}
2011-01-02 12:17:47 -08:00 --- error: Missing messages entry kohana/core.errors.403 for message kohana/core

Any idea? Thanks

 
APe

Joined: 2010-05-30
Posts: 5
Posted: Tue, 2011-01-04 09:58

Good, now the module work fine and I can also display waiting payments without errors. Why? I don't know, simply now it work.
Have a nice day.

 
elementalwindx

Joined: 2003-06-23
Posts: 29
Posted: Fri, 2011-01-14 05:29

Is there a way to make this module work so that the user can paypal me money I specify for the picture, and be able to proceed to download the full resolution image?

I want to use my gallery specifically to upload images I take with my cameras and I want the guests to be able to buy the full resolution image. I want to be able to gift them free images at the $0 price too.

If this is possible with this module, how do I go about doing that? Thanks!

 
jmeew

Joined: 2005-09-20
Posts: 9
Posted: Mon, 2011-01-31 00:27

I just installed the version you released on 8/30/10. I was able to activate and configure the module, however the "Add to Basket" button does not work. Also, when I logged in as an admin, the "View Orders" button took me to .../gallery3/basket/view_Orders and I got a 404 page not found error.

It will be highly appreciate if you can help me look into it!

 
jmeew

Joined: 2005-09-20
Posts: 9
Posted: Mon, 2011-01-31 00:26

I had godaddy upgrade my hosting server to Apach 2 and it's working now! I have another question though. On the check out page, when I'm asked to fill out the contact information, it does not have "State". I'm in the United States and "State" is an important part of the mailing address. "Suburb" is not necessary. Can the address labels be changed by the Administrator?

One more question. Is there a way to disable the offline payment option?

 
jbillings

Joined: 2009-11-12
Posts: 33
Posted: Mon, 2011-01-31 22:38

I have a request when you get the time. I'd like an option to remove the Pay Off Line button. It would save me many headaches.

Thanks for the great work.

 
UnrulyPhotog
UnrulyPhotog's picture

Joined: 2011-02-05
Posts: 1
Posted: Sat, 2011-02-05 19:50

Hello!
I have a couple feature requests for basket that I haven't yet seen mentioned in this forum. These are things that are in Gallery 2, but I don't see here in Gallery 3. I love the clean and easy to use interface with gallery 3 but, I think the shopping cart in Gallery 2 was far more robust and had some great features.

Here goes:

1) A way to apply different finishes to each print size and a way to price each accordingly.

For instance:
[8x10]
-Luster $2
-Glossy $2
-Metallic $3

2) A way of implementing discount codes for customers that could be used during the checkout process.
3) Default discount settings for specific criteria. For instance, if a customer purchases more that $X worth in their order, they get a discount of either x% or $x. The same could be applied for the number of prints purchased. If they purchase X number of different prints, they get X% off their order automatically.
4) On the product lines it would be awesome if you could customize the order they appear in the shopping cart. Right now if I want products to appear in a certain order I have to add a number to it like "1)" for an item to appear first. Could this appear as an additional field so that you can change the order of products with out having to rewrite everything?

Just my 2 cents and wishes! Thank you for providing such a well built module for Gallery 3.

Kindly,
Unruly

 
shortmatthew

Joined: 2009-04-22
Posts: 13
Posted: Wed, 2011-02-16 15:01

Is it possible to add the album name to the item when it goes to PayPal and/or is in the basket?
Many thanks, Matt

 
farmmax

Joined: 2011-02-22
Posts: 3
Posted: Thu, 2011-02-24 04:48

I've had no trouble installing this module a few times now. It is simple and seems to work fine.

I'm just surprised that someone can go through the whole process without registering on the site. Am I doing something wrong? I'd prefer that if someone isn't already logged in, that at least they had to log in when they pressed the "Proceed to Checkout, or "confirm order" buttons. Can I make this happen?

 
everestk2

Joined: 2011-02-26
Posts: 2
Posted: Sat, 2011-02-26 23:03

Just upgraded from win2k3 Gallery 2, to lamp Gallery3 and having trouble installing the basket module. Seems pretty clear it's a mysql error, but I'm not sure how to fix it. Also tried running the table creation code directly in mysql, but i get the same error.

...var/log error:
2011-02-27 13:49:57 -08:00 --- error: exception 'Database_Exception' with message '#1005: Can't create table 'gallery3.products' (errno: 121) [ CREATE TABLE IF NOT EXISTS products (^M
`id` int(9) NOT NULL auto_increment,^M
`name` TEXT NOT NULL,^M
`cost` DECIMAL(10,2) default 0,^M
`description` varchar(1024),^M
`postage_band_id` int(9) default 1,^M
PRIMARY KEY (`id`))^M
ENGINE=InnoDB DEFAULT CHARSET=utf8; ]' in /var/www/html/gallery3/system/libraries/Database_Mysqli_Result.php:27
Stack trace:
see attached txt

mysql error:
ERROR 1005 (HY000): Can't create table 'gallery3.products' (errno: 121)

Various different mysql forums seem to indicate the above error code indicates a foreign key problem or innodb tablespace problem, which means next to nothing to me. Any thoughts?

 
everestk2

Joined: 2011-02-26
Posts: 2
Posted: Sun, 2011-02-27 00:18

Nevermind, noob mistake. Didnt properly drop the database after a previous mistake. After properly doing that, and creating a new database and restoring the old, it worked fine.

 
waints

Joined: 2010-07-24
Posts: 16
Posted: Tue, 2011-03-15 09:34

When I make a change to the price of a photo via edit photo, the new price is implemented. But when the product is added to the basket it takes up the default price. Is there a way to fix this issue?

 
dmcantrell

Joined: 2007-10-04
Posts: 44
Posted: Sat, 2011-04-09 22:43

Hello,

I just got the gallery3 3.0.1 today (3.0.1 Menlo Park), this is a fresh install from scratch. I got the basket module from here (http://codex.gallery2.org/Gallery3:Modules:basket) which links back to this thread.

I unpack the module and move the basket directory into my modules/ directory. Then, using the admin control panel I try to activate it. I followed the instructions in this thread.

Here is the error message :

---------------------------------- clip -------------------------------------
2011-04-09 15:31:06 -07:00 --- error: exception 'Exception' with message '@todo postage already EXISTS No Postage' in /home/html/gallery3/gmodules/basket/helpers/postage_band.php:70
Stack trace:
#0 /home/html/gallery3/gmodules/basket/helpers/basket_installer.php(66): postage_band_Core::create('No Postage', 0, 0)
#1 [internal function]: basket_installer::install()
#2 /home/html/gallery3/gmodules/gallery/helpers/module.php(169): call_user_func_array(Array, Array)
#3 /home/html/gallery3/gmodules/gallery/controllers/admin_modules.php(91): module_Core::install('basket')
#4 /home/html/gallery3/gmodules/gallery/controllers/admin_modules.php(66): Admin_Modules_Controller->_do_save()
#5 [internal function]: Admin_Modules_Controller->save()
#6 /home/html/gallery3/gmodules/gallery/controllers/admin.php(62): call_user_func_array(Array, Array)
#7 [internal function]: Admin_Controller->__call('modules', Array)
#8 /home/html/gallery3/gsystem/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#9 [internal function]: Kohana_Core::instance(NULL)
#10 /home/html/gallery3/gsystem/core/Event.php(208): call_user_func_array(Array, Array)
#11 /home/html/gallery3/gapplication/Bootstrap.php(67): Event_Core::run('system.execute')
#12 /home/html/gallery3/gindex.php(102): require('/home/html/g...')
#13 {main}
---------------------------------- clip -------------------------------------

Thanks in advance for any help.

 
dmcantrell

Joined: 2007-10-04
Posts: 44
Posted: Sat, 2011-04-09 23:00

Aha! A little debug and I solved my own problem.

It seems that an older version of the basket module came along with the 3nids theme. The first time I tried to install basket, there was a failure. However, it had already created some tables in my mysql database. I removed the old basket module and replaced it with the new one downloaded from this thread and tried installing again, which produced the error above.

Using phpMyAdmin, I removed the tables "item_product, product_override, product, postage_band, order". Then, I tried installing again using the admin panel and everything seems fine.

 
ViewsofIreland

Joined: 2011-04-14
Posts: 1
Posted: Thu, 2011-04-14 22:48

Hi, many thanks for this wonderful module for Gallery. I was wondering if it is possible to globally change the price of all products on the site? So far, when I change a price in the products sheet it does not update and I have to remove and add the product to each photo manually...

Kind regards,

 
Wouter87

Joined: 2011-04-20
Posts: 1
Posted: Wed, 2011-04-20 10:44

Hi Ben and others here,
I've been trying to get your G3 module up and running on my website and I am well surprised by how smoothly it works, thank you for all the developing!

I've got one question: I want to get the confirmation e-mail, sent to the customer out of the system. I want it to only send it to me, I've got a few reasons for that:
My website is hosted at a different server, then my domain is on. Hosting provider wants the email sender òr the receiver adres to be of the domain the site is hosted on (I host it on a subdomain. Otherwise tbe email sent will be ignored. The problem is I don't want these two sites to be associated. Because of the "from" adres is from a different site, people might get confused. Also because the adress the email is sent from, is called "WordPress". Besides that, one domain/site is strict private and my other site/domain/gallery is for ordering purposes etc.

Therefore, I'd like to remove the part in the code where a confirmation e-mail is sent to the customer. Instead, I want it to email the confirmation only to me, so that I can edit out the other domain and sent a neat e-mail to the customer manually. All the processing of payments and ordering prints already has to be done completely manual, so it is no problem for me to send a short mail manually.

I hope you can point me the lines in the code which sent out the email to the customer. You might even want to add this as a feature (to turn off that customer mail.) I tried looking for it, but I'm not exactly a php genius unfortunately!

Once again thank you very much again for the great system, it just needs some tweaking for my personal use..

 
jtenkate

Joined: 2010-12-06
Posts: 45
Posted: Tue, 2011-04-26 16:09

You need to go to file 'basket.php' in the folder 'controllers'.
Then look for 'public function complete ()'. In this function, place a comment (//) before the line: basket::send_invoice($order);

Jeroen
www.kidsfotos.nl

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Thu, 2011-05-05 07:02

Coupons? Possible in the future?

Great module. Flawless so far.

 
drhiii

Joined: 2003-04-27
Posts: 397
Posted: Fri, 2011-05-06 03:48

Also, had a showstopper today with a potential photog looking at G3. Per album pricing. C'est possible down the road? Again, just askin'.

Still, great module by far....

 
ash_kh

Joined: 2011-01-15
Posts: 13
Posted: Sat, 2011-05-07 09:12

Great module. One issue that I can't see that's been covered here? Please correct me if I'm wrong.

Just upgraded to Gallery3.0.1 and while the basket is working in Firefox 4 and IE9, in IE8 the add to basket button is non-responsive. Has anyone come across this problem before?

I can't hope that my customers will be using IE9 (mostly I always hope they are using FF!) to prevent this.

Javascript is enabled.

I'm a designer rather than a developer so it's possible I broke something in the transfer of the modules when I upgraded but as it's just IE8 I didn't know if it was a bug or if it was me.

Any advice appreciated, I was really close to going live with my gallery!

If you need more info or links please let me know? Thanks

 
ash_kh

Joined: 2011-01-15
Posts: 13
Posted: Thu, 2011-05-12 17:57
Quote:
Just upgraded to Gallery3.0.1 and while the basket is working in Firefox 4 and IE9, in IE8 the add to basket button is non-responsive. Has anyone come across this problem before?

I've had someone test re: my IE8 issues and apparently it's specific to IE8 on Windows 7, so sucks for anyone who doesn't want to upgrade to IE9 I guess but at least it's not IE8 on XP.

 
rainadea

Joined: 2011-05-12
Posts: 1
Posted: Thu, 2011-05-12 19:03
Quote:
Was playing with markup today and made some progress for better integration. not perfect, but better. so I can wait on IDs
I was thinking, why not use sidebar block and put all the operations in there as just links

= Shopping basket = (id=g-basket-block)
Add to basket
Checkout (1 item)
View orders

very simple, easy to style, does not dance around
self-contained
See 6 minutes slap on

Serge,
THANK YOU!!!! I'm a total noob at code but I managed to figure out where to put the files and LOVE the add on.
For anyone else
/gallery3/modules/basket/views/basket_block.html_.php
/gallery3/modules/basket/helpers/basket_block.php
http://ourlocalphotographer.com promoting wedding and portrait photographers in Chattanooga

 
coppermine

Joined: 2011-03-17
Posts: 8
Posted: Fri, 2011-05-13 12:25

I've got a massive Problem with your module. I got a build of gallery3 and use the basket version from this thread.
If the "Add to Basket" button is clicked, i get the correct form with the widget popup from g3, if i hit "add" the returning window msg is broken, same for "backend" actions. But in the front end its a bit of a catastrophe. I Would hardcode it to something in my language, but i simply cant find it in the code, seems the g3buildXX widget/ajax handler behaves different from g2 of course, or you did not implement the msgs yet? Is my install maybe broken, seems to be ajax somewhere in connection. Other, Systems widget windows are just fine. It has to be in your module i think.

item_edit_form_completed() from basket_event.php configs the add to basket form, i cant find where the return comes from, ajax g3? result, success?
My msgs read like this:

Quote:
<div style="height: auto; min-height: 101px; width: auto;" class="ui-dialog-content ui-widget-content" id="g-dialog">%7B%22result%22%3A%22success%22%7D</div>

There seems to be a german translation which is on a few but very important things not complete, i dont get why people here are doing such stuff...

 
jtenkate

Joined: 2010-12-06
Posts: 45
Posted: Fri, 2011-05-13 13:49

There are several posts with your problem and the fix:
use version 5 from www.gallerymodules.com.
This version also contains an option to use the sidebar.

About the translations: you can share your improvements via Admin > Settings > Languages. Help us improve the module (as I'm trying).

Jeroen
www.kidsfotos.nl

 
coppermine

Joined: 2011-03-17
Posts: 8
Posted: Fri, 2011-05-13 14:34

PewPew, didnt expect that, i tried a search, seems i did an odd job. Sorry. It now crys for module updates after using the version of your link, but its fully functioning. All i wanted. Thanks for that!
If i configure it later i will remind to commit translation work i do.

Problem Solved. Maybe updated links should be in this thread, dont know maybe i read the beginning not in particular.

 
mossienz

Joined: 2011-06-08
Posts: 3
Posted: Thu, 2011-06-09 00:12

I have been told that this module calls the php mail function directly, instead of using the sendmail library? Could this possibly be changed? I cannot get php mail to work on my site, but have got the PHPMailer module up and running. WOuld like to use this if possible.

 
dupek

Joined: 2011-06-13
Posts: 2
Posted: Mon, 2011-06-13 02:43

Hi. Just installed the 3.1 and downloaded the baske file. I put it into module and activated. I got message that the basket is v4 and new v5 is available.
The update fail. Where I can download the v5?
Thanks.

 
robkelley

Joined: 2004-07-04
Posts: 9
Posted: Fri, 2011-08-05 14:43

Great mod but I get a weird msg when adding items to the basket:
[img]https://lh4.googleusercontent.com/-6T3BQgvJs4g/TjwAaSSGmJI/AAAAAAAAB5M/-pdHjgJ3Bzk/Capture.JPG[/img]
Any ideas?

 
webbaviation

Joined: 2005-10-20
Posts: 26
Posted: Mon, 2011-08-08 17:52

Hi, me too with the above error. I installed latest gallery 3 last Thursday and today installed basket. All seems to work until I come to buy. I click add to basket and the print size options come up but then when I add an option I get:

%7B%22result%22%3A%22success%22%7D

and nothing happens from then on. No emails, no order confirmation and I cannot see any sort of checkout / view basket link.

and help appreciated

regards,

Jonathan

www.webbaviation.co.uk

 
robkelley

Joined: 2004-07-04
Posts: 9
Posted: Mon, 2011-08-08 18:16

I fixed this by installing the latest version which is hidden someone where in this thread, page 3 I think.
It's crazy when you have to go through this entire thread looking to see if there is a newer version as the natural thing to do is download the one on page one - that's the one that is a beta and very old.
Why not overwrite the downloadable file with the latest, that way you don't need to keep posting the new URL for the latest version?

 
webbaviation

Joined: 2005-10-20
Posts: 26
Posted: Mon, 2011-08-08 18:42

Fixed! Thanks for the tip

Just reinstalled basket with the version posted 2/3 the way down page 2 of this thread with thread starting:

Posted: Wed, 2010-03-17 01:10

As promised here's a new version. It has the following new features.

It and the rest of gallery 3 is looking god so far. Just need to tinker with the languages now as its for my German website :o)

www.webbaviation.de
www.webbaviation.co.uk

 
tgontz

Joined: 2010-08-29
Posts: 13
Posted: Wed, 2011-08-24 20:01

I apologize if I should have created a new post for this issue. I am having two serious issues with the Basket module.

1. Using Internet Explorer 8 when I click on +Add To Basket and then Add either A. nothing happens and the Add button becomes grayed out OR B. the page refreshes but nothing is added to the basket. I don't just have this problem on one machine either. I get the same results on three different PCs running Windows XP with IE8. This function works fine in both Firefox and Safari. When the Add button is grayed out the only thing that you can do is click on the X to close the popup window or click on Cancel.

2. The second issue is that after a visitor enters their contact information and clicks on the Pay with Credit Card or Paypal button you are directed to the Processing screen and then to blank screen. You are not directed to PayPal's website. Where it reads "If you are not automatically redirected to paypal within 5 seconds Click Here." you ARE directed to PayPal if you click on the Click Here link. However, again, if you just wait to be taken to PayPal you will get a blank white screen.

I have tried disabling all other non-core modules and nothing makes any difference. I am using Gallery 3.0.1 and Basket version 5.

The url of the site that I am referring to is gallery.forevermomentspa.com

Any ideas?

 
tgontz

Joined: 2010-08-29
Posts: 13
Posted: Thu, 2011-08-25 03:37

This is an update to my previous post. I have discovered that everything (both issues #1 and 2 from above) works correctly when loading the gallery by going to http://50.22.11.10/~foreverm/gallery/ instead of http://gallery.forevermomentspa.com/.

My gallery installation is on a different server than the main site (completely different servers and hosting companies). I would really like to get this working without having to show the IP address of the server that the gallery is hosted on.

So, to summarize:
Everything with the module works correctly when I load the gallery using the actual address of the gallery. When I access my gallery as a subdomain of the main site that is hosted on a different server then the module doesn't work correctly.

Any ideas?

 
inwedes
inwedes's picture

Joined: 2011-08-25
Posts: 2
Posted: Thu, 2011-08-25 14:07

Hello,

i'm very new to G3 using&costomization (since yesterday) :-)

i recognises that this great basket modul breakes the pages modul at the darkdragon theme
for me in the moment it is too complex to unterstand why :-(

maybe its something in the theme, maybe this problem affairs other themes too
in my configuration the pages modul only works when i turnoff the basket modul

the pages modul only display the navigation links, this is working nice
but no content, title and body arn't displayed

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-08-21 05:56

Comments are now permitted for this topic.

 
hareslade

Joined: 2006-07-16
Posts: 20
Posted: Tue, 2012-08-21 11:47

I have some basket mods regarding only allowing registered users to place orders, enabling proper coding of the view order link, for normal registered users to just see their own orders, rather than admin-rated users who can see all orders. i'm pretty sure it does not work on the issued version.

While i can share the mods, is anyone there to help me sort out the modified module, and do the github side of things?
although i do php, the machinations of github are possibly beyond me if thats required.

And for instance, I'm using greydragon theme mostly, maybe other themes won't work.. so it needs some independent testing before letting it loose finally.

I'm not sure I want to take responsibility for publicising these mods long term, but they are useful in a site i'm creating with gallery 3.0.4, for a group of artists which includes me.

Please p.m me if it would bung up the thread with long discussions on this.

 
prophoto1

Joined: 2008-06-25
Posts: 10
Posted: Thu, 2012-09-27 21:52

Loving this module...for anyone looking to change the address line so it fits the USA addresses open /modules/basket/controllers/basket.php, you will find this from line 188 to line 199:

private function getCheckoutForm(){
$form = new Forge("basket/confirm", "", "post", array("id" => "checkout", "name" =>"checkout"));
$group = $form->group("contact")->label(t("Contact Details"));
$group->input("fullname")->label(t("Name"))->id("fullname");
$group->input("house")->label(t("House Number / Name"))->id("house");
$group->input("street")->label(t("Street"))->id("street");
$group->input("suburb")->label(t("Suburb"))->id("suburb");
$group->input("town")->label(t("Town or City"))->id("town");
$group->input("postcode")->label(t("Postcode"))->id("postcode");
$group->input("email")->label(t("E-Mail Address"))->id("email");
$group->input("phone")->label(t("Telephone Number"))->id("phone");
$group->hidden("paypal")->id("paypal");

Change it to this:

private function getCheckoutForm(){
$form = new Forge("basket/confirm", "", "post", array("id" => "checkout", "name" =>"checkout"));
$group = $form->group("contact")->label(t("Contact Details"));
$group->input("fullname")->label(t("Name"))->id("fullname");
$group->input("house")->label(t("Address"))->id("house");
$group->input("street")->label(t("Address 2"))->id("street");
$group->input("suburb")->label(t("City"))->id("suburb");
$group->input("town")->label(t("State"))->id("town");
$group->input("postcode")->label(t("Postal Code"))->id("postcode");
$group->input("email")->label(t("E-Mail Address"))->id("email");
$group->input("phone")->label(t("Telephone Number"))->id("phone");
$group->hidden("paypal")->id("paypal");

Hopefully future versions of this module will allow us to config the names in the admin area without hacking...

 
loptap

Joined: 2012-06-20
Posts: 11
Posted: Sun, 2012-12-09 01:08

RECOMMENDED READING ABOUT BASKET
First I have to say how impressed I am with the work that that glooper has done on basket - Gallery3 is brilliant but a gallery without a shopping cart is pretty much like a Ferrari without wheels - still nice to look at but not much use!; and there are lots of very nice javascripts available to put an 'album' on a website. I personally believe that 'basket' should be part of the core functionality - which would have eliminated some of the problems I am seeing.
I have now read this thread completely from start to finish just to make sure I am not missing something
There appears to be a significant problem with version control for this module.
1.In the thread (on 30th August 2010) glooper includes a link to the release of Version 5 - checking the files in the zip (see the image basket_3.zip.jpg) the dates are correct so we can be fairly sure that this was basket version 5 as released.
2.On Gallery3:Modules:basket http://codex.gallery2.org/Gallery3:Modules:basket, under Installation there is the comment

Quote:
THE FILE IN Gallery Module website IS OUTDATED, AND HAS ISSUES WITH THE CURRENT VERSION OF GALLERY3.
INSTEAD, DOWNLOAD rWatcher's corrected version download here that fixes the problem.

(@rwatcher). This is the official documentation for basket? right? so is definitive? Well no - what the hell is the CURRENT VERSION? what version did the comment refer to? looking at the contents of the 'recommended' zip (see the image basket-rwedit.zip.jpg) we see that the creation/modification dates are all 2012-01-23 - almost 16 months after the apparent initial release of version 5 but it is still referred to as Version 5?
3. So, ignoring the note (since the file dates pre-date the release of 3.0.4) getting the module from Download: Via Gallery Modules ‎and certainly up to only a few days ago (I believe as recently as Thursday) the contents of the zip file were as the image basket.zip.jpg and all file dates are 2012-06-28. Completely coincidently I first downloaded THAT module on the same day it was released. As of this evening the file downloaded is dated 2012-11-27 and all create/modify dates are the same 2012-11-27 but it is still referred to as Version 5?

So over 27 months we have four different files - all identified as Version 5 - and we still have the comment to not use the Gallery3:Modules:basket which you might ignore based on dates - but who is to know what version was used for any updates in this release? I have tried, and failed, with all three of the earlier versions (they all install, but none run properly) but since I have only just seen the 27-Nov version I still have that to try!

@nivekiam made some comment in some post 'not to include links to modules in posts - this is critical and the practise should be absolutely banned.

it appears that @glooper is no longer around (his last post appears to be 17 December 2010 - does this mean that there is no further development on basket (and WHO did WHAT changes on 28 June 2012 and 27 November 2012???)...
...I can already hear the response to that comment - if you want some changes or support why not get involved - but I am a photographer not a programmer. I am technically competent (I was building computers [not pc's] before most of you were around - in fact some of the more elderly of you might have used the computers I built on your computer science degree course; I can read and understand HTML, javascript and PHP (and can build basic websites using HTML XHTML ASP javascript and CSS2/3. But I simply can't spend 18 months (@alecmyers) learning to program in PHP and learning how Kohana works - I simply want a shopping basket that works now.

What I'd like to do right now is clinically remove basket (so there is no trace of it whatsoever) and start again. As I said right at the top of this post basket is great (as is Gallery3) but the shopping cart should be part of core functionality. If I can't get a working solution I'll have to look for a different solution

 
hareslade

Joined: 2006-07-16
Posts: 20
Posted: Sun, 2012-12-09 11:19

hi loptap
there are 2 files with 2012 dates in the latest download? both appear to be to do with the basket sidebar block, so if the mods are relevent use that version.

why not just list any probs on this thread, the basket module indeed could do with extra and better functionality, beware of if yuo're running php 5.3, its more likely to produce hiccups than on php 5.2

oh and btw, i've been working on the basket module privately for 6 months and yes, if it don't do what you want, then its down to altering coding, and many late nights. prob is, i had to modify some gallery3 core files to get the functions i wanted, so really your'e dead right, the guys who do the main gallery3 'should' really be incorporating mods so the basket can work as part of gallery3, rather than as an add on. i hope i don't invoke theire annoyance by saying that.. but if gallery3 had a standard basket up to modern specs it would really be useful.

 
loptap

Joined: 2012-06-20
Posts: 11
Posted: Sun, 2012-12-09 23:40

Hi hareslade
Not much point in listing problems on the thread - I am using Windows!
Vista SP2; Apache 2.2.22(WIN32) SSL; PHP 5.2.17; MySql 5.5.23 - it all works but is not supported! My myphpadmin MySQL version (5.051a) does not match the standalone MySQL - but because it is windows it is difficult to bring them into sync - though I accept this disparity might be part of my problem (by updating config files from myphpadmin :(). I am using an ampp for my webserver - but have replaced every component from the original (apart from the MySQL driver). All of this on a private server whilst I customise and check functionality before going live on my ISP's unix box. I don't have strong feelings about the lack of windows support - but it makes life interesting

Until sometime last week the file at http://codex.gallery2.org/Gallery3:Modules:basket, had dates of 28 June; that then changed to 27 November.
I am not really in a position to say what my problems are - all I have is the configuration screens - though, when adding ANY configuration detail, I get a dang page in a small non-resizeable/non-scrollable window so I can't see what the error is. I can do the configurations using MySQL myphpadmin - and the values then appear in the configuration screens. But I can't move beyond that - there is no 'add to basket' link! There is a basket heading in the sidebar - but nothing else.

I will try the new basket module (27 Nov) sometime this week - and update if I see a difference

If you are working privately on basket, here is a thought for you :) - I believe the ideal Gallery (any gallery) based shopping cart should allow you to add to cart, select options, manage the cart (remove items, change quantities)...
...but clicking on checkout should take you to a proper cart which uses REST to pull the data from the Gallery basket. Most Cart applications have already done the work on shipping, taxes etc (though OpenCart doesn't appear to do a great job on taxes) - so why re-invent the wheel? My reasoning - you can also use the other cart to sell services, goods, etc.
If you complete your modifications will you make your cart available as an alternative third-party module?

 
hareslade

Joined: 2006-07-16
Posts: 20
Posted: Sun, 2012-12-09 22:31

Hi loptap
yes you really do need the error log file, is it not at /var/logs? Plus you can put a temporary specific local.php in root of the gallery site, its documented somewhere i think in greydragon thread. Local.php forces more error msgs, but it can also prevent other functionality, as bugs in g3 then error and halt things, specially the admin product lines page.

The main functions for cart are indeed in the basket module, its a bit clunky specially if you call the paypal page twice, you get 2 orders for the same basket [i think] so that was a mod i did. Maybe when I finish messing around my version can go public, my main prob is ongoing support for that, specially if g3 goes to a new version, and settings things up so that my mods can be achieved easily. The rest idea is interesting.

 
loptap

Joined: 2012-06-20
Posts: 11
Posted: Sun, 2012-12-09 23:25
Quote:
is it not at /var/logs?

Duh! Yes I can see basket errors in the log file - don't know what they mean yet but since I have just removed basket (just before reading your post) I am not going to worry about it at the moment. I am now going to clear all caches, temp files, everything and install the 'new' basket - but only in a couple of days time.
Thanks for the tip about local.php - I'll look into that.

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Tue, 2013-01-08 09:53

Hello there,

using a Gallery 2 installation to my fullest satisfaction for a few years now I am testing Gallery3 at the moment and trying to find out if I want to use it :).

A shopping cart is essential for me and until now I am using checkout for Gallery2 which works great.

For Gallery3 there only is Basket, if I see it correctly and while it looks good and clean I stumbled upon something pretty obvious (for me) which apparently no one cared about for now.

When adjusting postage bands it is only possible to modify them specifically for the products I sell. Now my problem is that out of Germany I sell quite a few products to adjacent countries like Austria, for example. Shipping to Austria is obviously more expensive and in checkout I was able to set an option for national and international shipping, applicable during checkout. This is something I miss and was not able to find in basket. Is there an easy way to get to that or would I need to alter the code?

 
jtenkate

Joined: 2010-12-06
Posts: 45
Posted: Tue, 2013-01-08 18:26

Hi,

As the postage cost are linked to a product, there is no easy way to do it with configuration only (unless you define 'German' and 'Austrian' products).
Also, the postage cost are displayed in the first checkout screen. Your customer hasn't filled in his address and country. Changing that would be a major (coding) change to the Basket module.

Alternatively, you could code an extra charge, in case the country is not Germany. The checkout screen would need a notification that the shown posting costs only apply to German orders.

Best, Jeroen
www.kidsfotos.nl

 
Knilch

Joined: 2009-01-19
Posts: 44
Posted: Tue, 2013-01-08 18:51

Thank you very much, that is what I already was afraid of. Is there an easy way to code some sort of product into basket which could be ticked at checkout? How would I do that?

 
jtenkate

Joined: 2010-12-06
Posts: 45
Posted: Tue, 2013-01-08 22:19

I'm not sure I understand what you have in mind: you could code a checkbox similar to the 'allow pickup' checkbox, to indicate a foreign address. If the customer checks it, you add a fixed amount to the order. This is not a 'product'.
To do that, you must edit the checkout screen (in views) and modify the basket fuctions (in helpers) to get the right amount.

Hope that helps.
Best, Jeroen

 
chaosdax

Joined: 2005-12-27
Posts: 37
Posted: Sun, 2013-01-13 05:53

Knilch...I had a quick question for you, sent you a private message if you get a chance.