The deeper I delve into the Gallery2 - Zen Cart integration, the more frustrating it becomes. The zcg2 integration kit is great in getting the two systems to 'hold hands' as it were - but working beyond that point is really, really difficult.
Others have written about zcg2 throwing errors, but in my experience it loaded easily as long as the install instruction were followed to the letter.
I have tried to find working examples of successful integrations but haven't found any yet. So if anyone has a site that used both Gallery2 and ZenCart I would love to see it.
For anyone else implementing Zen Cart, I thought I would summarise the issues I have come across and to list those I have found solutions for. Our site is www.trekviews.com for reference and is still very much under construction.
Add to Cart Button
I was basing the theme on Carbon and wanted the cart icon to appear under each photo. This is achieved by editing navigation.tpl and changing the line
{if $link.moduleId == "cart"}
to
{if $link.moduleId == "zencart"}
Thanks Termitenshort for the heads-up
Template Appearance
I found this part quite daunting at the start because I wanted to use Zen Cart preferences as much as possible to structure the look of the site. At this stage I am still in the middle of implementing changes to the template.
The steps I would follow next time would be...
1. Turn off all unneeded modules and move them into the desired columns (Tools -> Layout Boxes Controller)
2. Structure Product View preferences - *this was hard to find* (Catalogue -> Product Types -> Edit Layout)
3. Build new template (using Zen Cart instructions)
4. Edit CSS file to make it consistent with Gallery2 theme. I found it easier to save an html copy of the product page, link the CSS to my template, and then edit the changes to the CSS in Dreamweaver. The Web Developer extension for FireFox is also invaluable to identify elements of the page.
5. Change the physical structure of the layout. Identify which tpl_ files need editing from template_default and copy them into your template directory. Then make changes in the PHP files. The main product display file is tpl_product_gallery_info_display.php but many others will require changing.
Cohesive Navigation
When visitors arrive at the site I want the navigation to be consistent. The links in the Gallery experience should come across seamlessly into the ZenCart experience. Also, some parts of the Gallery navigation will be depreciated in favour of the Zen Cart navigation, for example the registration form. I want people to register for the cart/newsletter rather than for the gallery.
This is currently my biggest headache. Gallery2 uses Smarty Templates while Zen Cart uses PHP. Each one can be changed in isolation but I can't get them to work cohesively.
Can anyone please shed some light on this?
Breadcrumb
The breadcrumb in Gallery is essentially part of the navigation header while in Zen Cart it is embedded into the content. I haven't tried moving the Zen Cart breadcrumb yet and have just commented out the relevant code from the tpl_ file for now.
Splash Page
I haven't looked at this at all yet but ultimately I want to implement a splash page to highlight specific product before the visitor proceeds into the gallery.
I imagine this to be 'hard coded' in html with a direct link to Zen Cart. Any pointers on establishing a splash page in Gallery2 would be appreciated. My guess is to hijack the index.php file and then simply to link across to main.php to allow access to the gallery.
Posts: 2
You've got an AWESOME site! I really like what you have done.
I'm working on something similar. For now I'm looking at the PGtheme but have read that it loads slower. I like the Carbon theme but I haven't yet figured out how to get the sidebar to remain viewable at all times. I think most visitors won't know to click on the little icon, and so it seems unnecessary to hide content they'll likely never see. If I could figure out how to have the sidebar viewable at all times, I would use it.
I'm still at the begining stages in my project, so I can't be of any assistance to you. Sorry. But I am grateful for you taking the time to provide the info that you have.
At the moment I'm working on how to make the image/photo that is purchased to be deliverd as a download (of course, AFTER payment). I've yet to figure out the download purchase process in Zen Cart. If you have any suggestions it would be greatly appreciated.
PS. For anyone who's receiving errors when adding and moving items in Gallery 2 after installing the zcg2 module: Chmod 'main.php' to 666. That's what worked for me.
Posts: 2
Another note about the zcg2 module throwing errors.
It turns out the errors I'm getting are 'security violation' errors when adding, editing, and deleting items in the main Album 'Gallery' (the top level). All other subAlbums present no problems with these functions. The work-around, albeit not a pretty one, is to deactivate the Zen Cart module before making any changes and then re-activating when finished.
If anyone has a better solution, I'm up for learning something new.
-------
Security Violation
The action you attempted is not permitted.
Back to the Gallery
Error Detail -
Error (ERROR_BAD_PARAMETER)
* in modules/zencart/classes/GalleryZenCart.class at line 282 (gallerycoreapi::error)
* in modules/zencart/classes/GalleryZenCart.class at line 1299 (galleryzencart::fetchcategoryidbyalbumid)
* in modules/zencart/module.inc at line 347 (galleryzencart::updatecategoryfromalbum)
* in modules/core/classes/helpers/GalleryEventHelper_simple.class at line 131 (zencartmodule::handleevent)
* in modules/core/classes/GalleryCoreApi.class at line 2247 (galleryeventhelper_simple::postevent)
* in modules/core/classes/GalleryEntity.class at line 308 (gallerycoreapi::postevent)
* in modules/core/classes/GalleryItem.class at line 409 (galleryfilesystementity::save)
* in modules/core/ItemEditItem.inc at line 237 (galleryalbumitem::save)
* in modules/core/ItemEdit.inc at line 92 (itemedititem::handlerequest)
* in main.php at line 199 (itemeditcontroller::handlerequest)
* in main.php at line 87
* in main.php at line 80
System Information
Gallery version 2.1.2
PHP version 4.4.4 apache
Webserver Apache
Database mysql 4.1.21-standard-log
Toolkits SquareThumb, Gd
Operating system Linux server.net 2.6.9-42.0.2.ELsmp #1 SMP Wed Aug 23 00:17:26 CDT 2006 i686
Browser Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060921 Ubuntu/dapper-security Firefox/1.5.0.7
Posts: 12
Thanks for the kind comment vCarey.
Sidebar in Carbon
The sidebar is an absolute DIV but could quite easily be embedded into the structure. Initially I was going to embed the sidebar so that the information was readily accessable, but then we felt that the information contained within it wasn't crucial information. We felt that viewers would navigate through the site using the album images and photo images. As long as there were purchase options marked then the sidebar was better tucked away.
However, if you do want to change it, here are the template files you would need to change...
album.tpl and photo.tpl both contain the placement reference of the sidebar...
... and this can be positioned where ever you like within those tpl files.
They also contain navigation code that would need to be deleted...
sidebar.tpl is the actual sidebar itself and uses a style method to place itself (not in the CSS file). You would need to edit or delete this...
<div id="sidebar" class="gcPopupBackground" style="position:absolute; left:-190px; top:{$theme.params.sidebarTop}px; padding:1px;">
There is also javascript navigation code that would need to be deleted.
theme.js contains the slide functions and as long as the navigation references are removed from the the tpl files then it can just sit dormant.
theme.css has formatting instruction for the look of the div...
Digital Download
I'm sorry but I can't help you with this. We aren't offering a digital download facility but if we were I would be not be wanting to use Zen Cart. I think the Cart module within Gallery can handle this quite well (not 100% sure). The only reason we ended up using Zen Cart over the Cart module was for physical shipping, which Zen Cart handles well. Also, we are located in Australia and Zen Cart has a very good Australia Post module.
Security Violation Errors
I have a feeling that these errors may be coming up because Zen Cart isn't setup to receive the gallery items so is rejecting them (just stabbing in the dark here).
In Zen Cart admin, navigate to Catalogue -> Categories/Products.
Ensure you have an actual category to receive the images.
In Gallery admin, go to Site Admin -> Zen Cart -> Setup.
Ensure that 'Category in which to insert Gallery products:' is linked to a specific Zen Cart category and not just 'Top'.
Posts: 3
Hey guys, one quick inquiry, could anyone confirm if this Gallery2 - Zen Cart integration module is compatible with Gallery 2.1.2 ? The documentation explicitly mentions that it requires either Gallery 2.0.x or 2.1 not 2.1.x. I'd like to validate if it can work for G 2.1.2
Thanks
Posts: 12
Yes. I am using 2.1.2. It is only zCart that must be the older version.
Posts: 3
Thanks, what about your ZC version?
Posts: 12
Zen Cart is version 1.2.7
Posts: 4
I also have a Gallery2/Zen Cart site setup and running, and have found my frustration level high attempting to get these 2 packages to do more than just handshake. Has anyone had any success with any other eCommerce/Gallery2 integrations?
Douglas Holt
Watch This Interactive
Posts: 324
I am migrating to a new server after 5 years and don't want to bring my current online store, yet rebuilding a new one will take a ridiculous amount of work. My question is...when you integrate zencart with gallery do you have to add each photo in zencart as a product, or does it just grab the item from gallery and checkout with it? Having to add and recaption every photo in Zencart would be a huge amount of work. Does anyone have an actual integrationt hat we can see? Thanks
Posts: 324
I finally got the zencart 1.2.7 integration to work with gallery 2.2. I see above that you were able to use "add to cart"...I am using PGtheme and I'm wondering which template to edit in order to make that change? Alos, does anyone know how to change "purchase options" text to something else?
Photos of New York City by Andrew Prokos
Photos of Washington DC by Andrew Prokos
Posts: 1642
I think if you change $this->translate('Purchase Options'), in here from Module.inc
.
Gallery Version: 2.1.2
Gallery Theme: PGTheme 1.1.0 (RC01)
Web Site: http://dakanji.com
Posts: 1642
One query on my part.
Once ZC is installed, everyone has permission to view/use it. I can't find anything in the module.inc file similar to registering permissions found on other modules.
Anyone know how to implement this?
.
Gallery Version: 2.1.2
Gallery Theme: PGTheme 1.1.0 (RC01)
Web Site: http://dakanji.com
Posts: 324
Yes, I changed the purchase options text last night, and I also realized that you can configure module.inc to pass along options from the beginning such as print size, framing, etc. I just changed the existing options and added new lines:
You can add an unlimited number of lines and options it seems...however, there is no way to control what order they appear in...which is a mahor pain. I resorted to lettering the options a, b, c, d, etc. I still can't get "Print Size" option to come before "signing" though...does anyone know how to control the option order? Sorry Dayo, I have no idea about assigning permissions in module.inc.
***Warning: You are able to change product options, pricing, etc through ZenCart admin itself...but if you disable the module in gallery for any reason you will lose all of your options and pricing! Seeing that it is sometimes necessary to reload the module if it is best to hard-wire as many options up front in module.inc rather than making changes through ZenCart admin.***
I have a nightly build of gallery 2.2 v 1.1.6 and the module is working fine so far with zen cart. If you have MySql 5.x.x installed on your server you will have to install the necessary patches for the ZenCart application files (not ZenCart gallery module) to get it to work. The patches can be found on the ZenCart site.
New York Architectural photos Rockefeller Center photos, Radio City Music Hall photos, Brooklyn Bridge photos, Grand Central Station photos, Statue of Liberty photos, Chrysler Building photos, Empire State Building photos, Time Warner Center photos, United Nations photos
Posts: 4
I have the same question as Dayo. Is there a way to prevent Zencart fromm displaying galleries (categories in Zencart) for which the user does not have permission to view? I can just remove the Categories altogether but it would be much more useful to be able to continue to display the galleries (categories) for which the user does have permission to view, rather than hiding all categories and forcing the user to return to Gallery to choose more images for the cart.
Also when the user is returned to Gallery they are returned to the Main Page rather than the page from which they navigated into Zencart. Does anyone know of a way to have ZenCart return the user back to the page which displays the image (or gallery) from which they navigated?
Douglas Holt
Watch This Interactive
Posts: 12
Both of your points frustrated me as well. In the end I just got rid of the whole navigation panel within the cart and put up with returning to the gallery home. Would be interested if someone finds a solution. This wasn't such a problem for us because at this stage we only have one album.
Posts: 3
I have successfully installed and configured the zencart module 1.2.7 into G2 but cannot activate it as there is no “activate” link field only a configure/uninstall in the Actions column. Any idea as to why there is no activate field? Any help here would be greatly appreciated.
Thanks
Jeff
Posts: 1642
jeffhugh2
You need to configure before activating.
.
Gallery Version: 2.1.2
Gallery Theme: PGTheme 1.1.0 (RC01)
Web Site: http://dakanji.com
Posts: 3
Thanks, Dayo. But I have configured it and it gave me a "configuration successful" remark. But still, no "activate" option yet.
Posts: 12
It appears as though PGTheme sets up the cart buttons in its parameters, so I would suggest trying there before editing template files. If it doesn't work, make sure you get Gallery working visually the way you want it to using its in-built cart, then activate zencart to see what changes. If the buttons disappear then search through the theme.inc file to manually change parameters. This is possibly also where you can change 'purchase options' text.
Posts: 12
Make sure you have physically setup a category inside Zen Cart for Gallery to use. Gallery won't make its own initial category. I think from memory that this will then allow you to activate. 'Top' is not a valid category for Gallery to use in the Zen Cart setup page.
Posts: 49
i was having the same problem there, that did the trick - thanks
Posts: 1
One observation:
If you go to Zen Admin > Configuration > Images > and edit Small Image Width and Small Image Height, leaving the size empty, the thumbnail will appear with its correct proportions, whether it is landscape or portrait orientation.
Hope this is useful to some of you.
Cheers,
Nugar
Posts: 324
Thanks Nugar, I went back in and reset the image sizes and it's a dramatic improvement...now all of the photos are proportionate!
Andrew
Washington DC Photography
New York Photography
Black and White Photography
Posts: 24
I have just finished one of these installations and have 2 issues - one is a stupid zen cart one (on the shipping info page i cant remember whixh page to edit so "your shiping info goes here" is displayed above my text (Grrrr) and the pricing module from within zen cart is pretty clunky.. if anyone has a dead fast way of generating new prices and ooptions on the fly, i would be pleased to know.. adjusting the whole lot in the module is a pain
www.bwp-by-rk.co.uk/photoportal/gallery/
Posts: 1642
Richard King
You might want to take another look at the Checkout Module which has been significantly upgraded.
If you find that ZC offers you more,
Issue 1: your-path-to-zc/includes/languages/english/shippinginfo.php (This is where php files for such text are held)
Issue 2: Setting this is a real pain although once you have it up and running, it runs fine.
One option is to use the module setup to do it.
a) Back up your DB
b) write out your categories and prices
c) uninstall the G2 module
d) save a copy of module.inc
e) edit module.inc as in this example
This will create two categories: print size & print finish and will populate them with the options. The two numbers after each option e.g this->translate('A5 Size (6x8")')), 5,10); are price and weight.
f) Install the G2 module
Notes:
1) If this fails, roll back and you will be none the worse off
2) It is illegal to offer items for sale using imperial weights (lbs) in the UK. There is a how-to on the ZC site on how to change this.
3) There is a Royal Mail module for ZC that will allow your site to get real time postage prices and for buyers to select shipping modes. You might want to check whether this requires grams or kg and adjust your installation accordingly. I think it is kg
4) There are some useful ZC modules here including the Royal Mail Shipping Module. Take a look at the Mass Update & Edit Orders Modules as well.
5) Be aware that G2 integrates into an older version of ZC which may pose some issues.
.
Gallery version = 2.2.2 core 1.2.0.4
PHP version = 4.3.9
Operating system = Linux (CentOS 4)
Default theme = PGtheme
Web Site: dakanji.com
Posts: 24
Thanks for all of that It was a really comprehensive answer, I really appreciate your effort
- I will look at it over the next few days
the lbs thing is only used to calculate the postage, and was a wet finger in the air, I was going to do everything postage free, but then decided against it. I would be really happy if the weight wasnt displayed at all
Posts: 24
Thanks once again, You saved me hours. I udated all those shipping files etc. today
I have also sorted the Lbs Kgs issue. Thanks for pointing this out to me I popped in the Royal Mail shipping module. I was caught out by the extra 3KG's thing, but I resolved that.
I think I have sussed out the part of the database I need to change when I alter pricing on the fly so essentially I can set the pricing for each new album without too much stress
What I will do is save a notepad copy locally for each job. This lets me have differential pricing for different types of image. I am sure most of them will be set up in 1 of 3 ways, and the odd catagory will need a different price structure. What I will do is just update the database field with my saved "wedding pricing" before I upload wedding pictures, and then say an "event pricing mask" for events etc
I need to crowbar gallery into my main site now, and also fluff the gallery up with a little web polish, and then I will be a very happy photographer
Posts: 13
Das123
your site looks incredible! I've just started down the G2ZC path and it looks like I've a long way ahead of me.
It would be great if you could post a tutorial on how you built yours?
Posts: 1642
kingstog
Since you are just starting along the ZC path, you may wish to follow the way set out here.
.
Gallery version = 2.2.2
Default theme = PGtheme 1.3.0
Web Site: dakanji.com
Posts: 13
Thanks for the heads up
Posts: 397
Hello Dayo,
We've communicated here and on another site while drilling down in ZC + G2. Have been outta pocket for a bit with some horrendous medical issues for my missus. Getting back in the saddle.
Question, and I believe I broached this once before: I'm working to create a TLD name that accesses a site setup e.g. www.xyz.com
I do not want to run a splash page and wish to redirect to the www.xyz.com/gallery2 directory. No problem as .htaccess can easily do this.
However, ZenCart wants to reside 'above' G2. I am struggling with how to evolve this because the URLs not only get ugly, like www.xyz.com/zencart/gallery2, but I've tried mucking around with some URL Rewrites to redirect from www.xyz,com down two directories to the G2, but then have G2 and ZC interact properly.
Ideally, I'd like to have www.xyz.com as the TLD that goes directly to G2, but ZC doesn't like that. I have seen an example in Trekviews.com where there is a splash page answering to www.xyc.com and the two references that are maintained are www.xyz.com/gallery and www.xyz.com/zencart that is at least clean, but am scratching my head as to how that works given ZC needs to sit on top of G2.
Thought on how to solve the above. Not sure it makes sense, but it is causing some heartburn on this side.
tx, and I am looking forward to getting into the latest ZC/G2 bridge.
drhiii