How to remove "add album to cart" from the album pages after installing Checkout module and Checkout module by email.

vdd

Joined: 2005-08-11
Posts: 111
Posted: Mon, 2005-10-03 07:27

After installing G2 with the matrix theme, I was able to remove "add album to cart" from the albums pages with the
help of this forum.

Made a change in modules/cart/module.inc. Change: foreach ($items as $item) {
into: foreach ($items as $item) { if (!GalleryUtilities::isA($item, 'GalleryAlbumItem')) {
and a bit below that change } to }}

Now that I have installed the modules Checkout and Checkout by e-mail I got back the "add album to cart" beneath the
album thumnails.
You can guess my question: How to remove this. I looked over and over again but I can not find where to do
Too stupid?
Further on the photothumbnails page I now have the Item Actions box with two possibilities:
Add Photo To Cart (from the cart and zip module)and
add photo to cart (from the Checkout module and Checkout module with email)
Can I show these two options to the visitors of the photopage permanently and can I change the text "Add Photo To Cart"
in something like " download in high res " Where to do ?
vdd

Login or register to post comments
hemlockz

Joined: 2006-03-11
Posts: 5
Posted: Fri, 2006-03-17 20:52

for anyone still trying to do it... modify for modules/checkout/module.inc and uncomment the following three lines 257-259:

if (GalleryUtilities::isA($item, 'GalleryAlbumItem')) {

continue;

}

Login or register to post comments
pumaka

Joined: 2007-05-14
Posts: 33
Posted: Tue, 2007-05-15 02:06

I just wanted to add, in case someone else was doing like me:
do not create a /local directory for this, just over-write the original module.inc.

I kept trying it with /local and it didn't work (I thought everything in G2 looked for the /local files first, but I guess not!)

Login or register to post comments
rogb

Joined: 2006-06-27
Posts: 14
Posted: Tue, 2007-05-29 07:42

/local only applies for the template directory. This file is part of the main module code.

As an aside, I made a similar change and it works well.

Login or register to post comments
Parrish

Joined: 2008-04-18
Posts: 6
Posted: Mon, 2008-04-28 07:34

Just wanted to add that the three lines hemlockz mentions are now lines 316-318 (in version 0.1.14). Your version lines may vary, but you can do a search for the first line of course: "if (GalleryUtilities::isA($item, 'GalleryAlbumItem')) {" (remove the quotes)
or the function name is getItemLinks.

Thanks hemlockz, your instructions worked for me.

Login or register to post comments
alecmyers

Joined: 2006-08-01
Posts: 616
Posted: Mon, 2008-04-28 12:51

Just to add, in the version of checkout in the community repository (0.1.18) and all later versions this is a configurable option in the admin page so there's no need to edit any code.

Login or register to post comments