[Module] Zencart Bridge

Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Mon, 2008-12-08 18:09

mark3738

Add option values to the Poster and Canvas Print options called "No Thanks" or similar with a price of "0" in Zencart Admin.

Actually, I think it will be better to use drop downs for each set of options and to have the "No Thanks" value in each but to make the sort order for this high for the Print Size Option so that your A4 size is selected by default and low for the other options so that this is selected by default for the others.

--
Gallery version = 2.2.6
Default theme = PGtheme 1.3.0
Web Site: dakanji.com

 
JanetHall

Joined: 2007-08-12
Posts: 2
Posted: Mon, 2008-12-08 19:39

I have a question about adding the password to the albums in zencart.
I downloaded this "bridge" between zen cart and gallery 2 and so far everything is good and it is almost ready to go live, however I am having problems with the password part in the zencart area. I have read the "read-me" and have updated the tpl_check_albums.php file in the commons section of my template. When I go to my zen cart, and click on the album that I added the password to, I get the drop down "enter the user name / password" box, but when I enter the correct information and press enter, it clears the info and request it again. It doesn't advance to the page or give me "you have enter the wrong information"...it just loops. If I click the "cancel" button on the box, then it takes me to the "wrong information / error" page telling me to contact the administrator.

Any ideas as to why it just loops?

Janet

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Tue, 2008-12-09 08:00

JanetHall

That shouldn't be happening although I can't test right now to confirm.

This is part of the code in tpl_check_albums.php....

case "#_01":
   $myusername = "some_username";
   $mypassword = "some_password";
   $areaname = "Album 01";
   $access_details = 'Please contact the <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">Site Administrator</a> for access details';
   include("tpl_auth.php");
  break;

Can you post a copy of a sample of what you have edited it to?

--
Gallery version = 2.2.6
Default theme = PGtheme 1.3.0
Web Site: dakanji.com

 
JanetHall

Joined: 2007-08-12
Posts: 2
Posted: Tue, 2008-12-09 14:44

Here is what I have edited to:
case "850_1001_1023":
$myusername = "church08";
$mypassword = "church08";
$areaname = "Episcopal Church of the Holy Spirit";
$access_details = 'Please contact the <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">Site Administrator</a> for access details';
include("tpl_auth.php"); break;

Yesterday I played with the "850_1001_1023" section and finally learned that you don't need the cpath= part...but with all of the playing on the $myusername section I can't get it to accept the username/password.

the tpl.auth.php, which I haven't touched, is:
if ($_SERVER["PHP_AUTH_USER"] == "" || $_SERVER["PHP_AUTH_PW"] == "" || $_SERVER["PHP_AUTH_USER"] != $myusername || $_SERVER["PHP_AUTH_PW"] != $mypassword) {
header("HTTP/1.0 401 Unauthorized");
header("WWW-Authenticate: Basic realm=\"$areaname\"");
echo "<center><h1>" . $areaname . ": Access Control</h1><br />" . $access_details . "<br /><br />Thank you<br /><br /><br />" . zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . "</a><center>";
die();
}
?>

If you need a link to the site, let me know and I can pm it to you.

Thanks.

janet

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Tue, 2008-12-09 16:01

JanetHall
Your code looks O.K. Bear in mind that the passwords and usernames are case sensitive.

In any case, I have updated the module to V3.2.3 to fine tune the access control setup as well as a couple of other things.

Available from the codex (see first post).

Let us know how it goes.

Please remember to indicate what versions of G2 & the module you are running whenever you ask for support (didn't matter for this but useful to know).

--
Gallery version = 2.2.6
Default theme = PGtheme 1.3.0
Web Site: dakanji.com

 
smoye

Joined: 2008-12-16
Posts: 1
Posted: Tue, 2008-12-16 03:39

Hi,
I am having trouble with the image sizing between the two programs. If I define one image size say longest thumb px size in Gallery = 150px and item image size in ZenCart = width: 100px x height: 150px, this only works for lengthwise pictures. Is there any option that i am missing that will prevent horizontal pictures from becoming distorted. They only distort on the catagories (albums) pages in ZenCart, but the item (image) pictures look good.

Thanks,
Seth

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Tue, 2008-12-16 08:45

smoye

Log in to your Zencart admin and set the image sizes to match your G2 settings under configuration>images.

Remember that you are running two separate programs and each has its own settings you need to attend to.

--
Gallery version = 2.2.6
Default theme = PGtheme 1.3.0
Web Site: dakanji.com

 
KentBarrett

Joined: 2008-12-22
Posts: 19
Posted: Mon, 2008-12-22 18:37

Hi ho,

I'm on my third attempt at the Gallery 2 Zen Cart module. I've just done a fresh default install of Zen Cart and Gallery, exactly as per the instructions as far as I can tell with the gallery at

http://newfoundlandartstore.com/gallery/
and the store at
http://newfoundlandartstore.com/gallery/store/

Now, Gallery is talking to the Zen Cart db, i.e. items added via Gallery appear in the Zen Cart, however, the pictures do not. I wind up with a zen cart item with no pic. "Selection: Add Item" works, i.e. it takes you to the Zen Cart item as it should, but no pic.

I'm getting a Bad Parameter error from Gallery when I upload pics. Details below. The pics ARE added to Gallery, but I get the error page. This is what I can't skull out, so any help would be appreciated. I really want to use this module.

I've set up a test account in the Gallery at http://newfoundlandartstore.com/gallery/ if you care to have a look.

user test
pass test

The setup is Zen Cart 1.3.8a running on Database: MySQL 5.0.67 and Apache
This is on GoDaddy's servers if that makes any difference

Any suggestions welcome.

Quote:
Error (ERROR_BAD_PARAMETER) : 0
in modules/zencart/classes/GalleryZenCart.class at line 283 (GalleryCoreApi::error)
in modules/zencart/classes/GalleryZenCart.class at line 1316 (GalleryZenCart::fetchCategoryIdByAlbumId)
in modules/zencart/module.inc at line 409 (GalleryZenCart::updateCategoryFromAlbum)
in modules/core/classes/helpers/GalleryEventHelper_simple.class at line 111 (ZenCartModule::handleEvent)
in modules/core/classes/GalleryCoreApi.class at line 2238 (GalleryEventHelper_simple::postEvent)
in modules/core/classes/GalleryEntity.class at line 285 (GalleryCoreApi::postEvent)
in modules/core/classes/GalleryDerivative.class at line 239 (GalleryEntity::save)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 753 (GalleryDerivative::save)
in modules/core/classes/GalleryCoreApi.class at line 1720 (GalleryItemHelper_medium::setThumbnailFromItem)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 531 (GalleryCoreApi::setThumbnailFromItem)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 246 (GalleryItemHelper_medium::applyDerivativePreferences)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 188 (GalleryItemHelper_medium::addExistingItemToAlbum)
in modules/core/classes/GalleryCoreApi.class at line 1668 (GalleryItemHelper_medium::addItemToAlbum)
in modules/core/ItemAddFromBrowser.inc at line 99 (GalleryCoreApi::addItemToAlbum)
in modules/core/ItemAdd.inc at line 159 (ItemAddFromBrowser::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules/core/classes/GalleryTemplateAdapter.class at line 1092
in g2dataimetim/smarty/templates_c/%%4093520897/matrix/%%3A^3A8^3A818B59%%theme.tpl.php at line 75 (GalleryTemplateAdapter::trailer)
in lib/smarty/Smarty.class.php at line 1255
in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Mon, 2008-12-22 19:13

KentBarrett

There is an issue with the module that means thumbnails may not be added correctly at times as in you get an "image missing" replacement instead. For this case, the best advice is to make sure you have loaded all your images before installing the module. For images added after the module is active, you need to deactivate and then reactivate the module. This issue will be addressed in due course.

As for your error massage issue, I don't know what that is about except that there are issues with GoDaddy who seem to use unconventional settings.

Here is an example of an issue with their servers from the ZC site

Sorry I can't be of any more help.
--
Gallery version = 2.2.6
Default theme = PGtheme 1.3.0
Web Site: dakanji.com

 
KentBarrett

Joined: 2008-12-22
Posts: 19
Posted: Mon, 2008-12-22 21:41

Ach, I despise mysteries.

I've turned off all the plugins I don't need just on general principles, and tried toggling the ZC plugin on and off. I've tried using the complete physical path (vs ./store). I've tried rewriteurl on and off.

Sigh.

 
KentBarrett

Joined: 2008-12-22
Posts: 19
Posted: Mon, 2008-12-22 22:00

I uninstalled the ZC plugin completely, then re-installed. Now pics are uploading without the error it was producing earlier. So that's progress of a sort.

What's particularly maddening is no image paths get to ZC at all. On an earlier install attempt today that was working sometimes. In that incarnation I had the gallery in the store dir, not the other way around, but how it matters I can't see as long as the path is set correctly in the plugin?

What's left to fiddle with... maybe it's blood sugar is low. I'll try it again after supper.

 
KentBarrett

Joined: 2008-12-22
Posts: 19
Posted: Tue, 2008-12-23 00:57

Yes that was the problem, hypoglycemia.

Well that, plus it wanted the product_image var set beefier and the long thumbnail URLs used and the plugin toggled. Happy to report your fix for that worked. I really didn't think I was running into that situation because it was partially working on an earlier install on the same machine.

Wonderful. I love a happy ending.

Thanks for this cooool tool!

:-)

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Tue, 2008-12-23 04:11

KentBarrett
Nice to know you have managed to resolve the issues.

--
Gallery version = 2.2.6
Default theme = PGtheme 1.3.0
Web Site: dakanji.com

 
KentBarrett

Joined: 2008-12-22
Posts: 19
Posted: Wed, 2008-12-31 13:33

Lookin' good.

I have everything working and this looks like a fine solution for my art store. One thing left to do before I can load up the real content: the automatically added options. These must go. Everything gets added to Zen Cart priced by these options which I will not be using at all, so every item must be laboriously fixed in Zen Cart.

Question: what do I edit to remove the automatically added print-size/glossy-matt options?

Part B: if I wanted to automatically add just a simple default price what would I add instead? That would be most useful.

Thanks,

-Kent

System info:
Gallery URL = http://newfoundlandartstore.com/gallery/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.5 cgi-fcgi
Webserver = Apache
Database = mysqli 5.0.67-log, lock.system=flock
Toolkits = LinkItemToolkit, Thumbnail, Gd, ImageMagick
Acceleration = none/604800, none/604800
Operating system = Linux p3slh139.shr.phx3.secureserver.net 2.4.21-53.ELsmp #1 SMP Wed Nov 14 03:54:12 EST 2007 i686
Default theme = nlasmatrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Rows in GalleryAccessMap table = 97
Rows in GalleryAccessSubscriberMap table = 70
Rows in GalleryUser table = 5
Rows in GalleryItem table = 66
Rows in GalleryAlbumItem table = 8
Rows in GalleryCacheMap table = 19

 
R_C

Joined: 2008-07-22
Posts: 3
Posted: Tue, 2009-01-20 04:54

Morning Dayo,
has Chuck Redmans digital download v2.00 mod been rolled into your latest version?

I require it for my website and I'm hoping to avoid doing the roll in myself ;-)

yours
Russell

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Tue, 2009-01-20 13:16

R_C
No, it hasn't been rolled in and no new features are being added to the module pending the imminent releases of G3 and ZC2 when an assessment will be carried out. So for now, the downloads work within the context of ZC without automatic linking to G2.

If you are willing to add any new features in such as automating the setup of downloads, then please do so and I'll assist as much as I can as long as you make the final product available to all.

--
Gallery version = 2.2.6
Default theme = PGtheme 1.3.0
Web Site: dakanji.com

 
R_C

Joined: 2008-07-22
Posts: 3
Posted: Thu, 2009-01-22 10:40

Dayo
Done and done, I will ping you with questions as they arise, and naturally anything that comes out can be fed back into a general release.

Russell

 
insomnix

Joined: 2009-04-19
Posts: 24
Posted: Tue, 2009-05-05 03:04

I have been getting hammered for days with a little issue. I have gallery integrated into a zencart website. Everything works fine, I can upload and edit photos. When I turn the G2 to Zencart bridge on, I have problems uploading images. From www.mydomain.com/gallery I can add all the pictures I want, but from www.mydomain.com/index.php?main_page=gallery (my integrated gallery page) I get some serious errors. Like:

Notice: Constant HTTP_SERVER already defined...
or
Fatal error: Cannot redeclare function...

It appears that these functions/constants are already loaded from the consumer side and they are trying to be redeclared from the admin folders. I am not familiar enough with gallery or zencart to find where I need to fix the issue. My first thought was to run through the admin section, because the admin section functions are being called after the consumer section, and add "if(!function_exists('function name')){...}" around all the functions. Indeed I tried this for the first error function to see what happens. It worked. Two problems I see with this is that not all the admin functions are the same as the functions on the consumer side, and adding that line on every function would take forever.

Has anyone out there run into a similar problem?

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Tue, 2009-05-12 04:07

insomnix
Your website is for a webhosting service. No sign of gallery2 or zencart there.
--
dakanji.com

 
R_C

Joined: 2008-07-22
Posts: 3
Posted: Sat, 2010-05-01 11:29

Morning All,
after much delay, i have rolled chuck redmans download g2->zc code into Dayo's g2-zc 3.2.2a version.
I'll download the latest version and see how much it complains..

Russell

 
raedwulf

Joined: 2005-10-29
Posts: 29
Posted: Sun, 2010-05-02 10:14

I will be all ears to see how this progresses. Am running a g2 <--> zc bridge now, and was just working inside it today to tweak some things...

R_C wrote:
Morning All,
after much delay, i have rolled chuck redmans download g2->zc code into Dayo's g2-zc 3.2.2a version.
I'll download the latest version and see how much it complains..

Russell

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2010-05-07 15:30

Hi

Almost missed this.

I am actually currently working on rolling Redman's code in. It will be done in a way that avoids overwriting the cores files.

--
dakanji.com

 
cel0202

Joined: 2009-04-26
Posts: 16
Posted: Fri, 2010-06-04 03:40

Hi all,

Does the Zen Cart module only work with 1.3.8a? Would there be a concern with upgrading Zen Cart to 1.3.9c? I was going to attempt the upgrade but thought I should pose the question first.

Thanks!

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2010-06-04 09:56

It has not been tested with the 1.3.9 branch.

I'll suggest backing everything up before going for the upgrade.

On the other hand, the patched 1.3.8a supplied has many of the improvements later added officially and released as 1.3.9 so there isn't as great a need to go to 1.3.9 if using the supplied version.

--
dakanji.com

 
cel0202

Joined: 2009-04-26
Posts: 16
Posted: Sun, 2010-06-06 05:39

FYI... since I haven't launched my site yet I decided to do a fresh install of Zen Cart using the 1.3.9d zip rather than using the 1.3.8a Gallery integrated file. I followed the instructions exactly (installed Zen Cart, configured Zen Cart for use with Gallery, created ZCG2 folder, copied the latest module files to the module folder of Gallery, etc). When it came time to configuring Zen Cart within Gallery I received the "Illegal Access" screen after inputting the directory to the store.

So... I also tried doing the upgrade from the 1.3.8a pre-integrated installation based on Zen Cart's instructions and when it came time to access the Zen Cart module within Gallery, it was also having errors.

So currently, it seems like 1.3.9d does not work with the current 3.2.6 ZCG2 module. Not a big deal at the moment, but I am curious as to what will happen when it does come time to update Zen Cart to future upgrades due to security patches not currently implemented within the pre-integrated installation?

 
seeinstars89

Joined: 2007-02-21
Posts: 7
Posted: Tue, 2010-07-06 00:08

I am currently using Gallery 1 with my zen cart using frames. I want a fully integrated gallery on my site without using frames so I can make direct links to certain galleries. However I do not want to give people the option to buy the "items" in the gallery, I just want them their for people to look through like a portfolio. Can this mod do that?

 
mark3738
mark3738's picture

Joined: 2005-10-14
Posts: 7
Posted: Tue, 2010-07-06 00:36
Quote:
I want a fully integrated gallery on my site without using frames so I can make direct links to certain galleries.

If you only want to use the Gallery as a portfolio and without the option to buy items, you may be better to install a separate standalone Gallery and hard code a link to it from your Zen Cart. That way you only need to customize your Gallery to look like your Zen Cart.

This may depend on your skill level and not answer your question directly, but at least this way you could install the latest versions of Zencart and Gallery without having to worry about the Bridge being compatible.

Medlicott Design
Helping you reach the world from your place

 
seeinstars89

Joined: 2007-02-21
Posts: 7
Posted: Tue, 2010-07-06 00:48

Yes I have had that set up like that before but I really want people to stay within my zen cart while browsing the gallery and always have the categorys on the sidebars. Alot of people link to our photos from forums and other sites and I want the people that follow the links to know exactly what I sell and what is available....

 
gaurav10feb

Joined: 2010-08-24
Posts: 31
Posted: Mon, 2011-06-20 07:06

I am sorry for breaking the queue here. but can someone tell how can i update the ZCG2 integration...should i just copy the new files for zen cart gallery integration...i am having problems changing product options value as i get an error. hope upgrade will fix this.

i did copy and then i had to activate the zencart module again but its not happenin...i have about 50000 images and it doesnt activate? any suggestions.

 
mark3738
mark3738's picture

Joined: 2005-10-14
Posts: 7
Posted: Mon, 2011-06-20 08:14

Hi Gaurav

I assume you are trying to do the product option updates on the Gallery side and not on the Zen Cart attributes side of the system? I used to get this problem too, and it usually occurred once our gallery had got quite big. There are various problems associated with this and at the time I believe I renamed my g2data folder using ftp (or your control panel) and then reinstalled Gallery 2 and set up the bridge with Zen Cart again and once it was running again I then imported the images since they were on the same server.

I have found some posts about this here http://gallery.menalto.com/node/69302?page=3#comment-285834 which may have some more info that can help you.

The main website I used it on had over 300,000 photos at a time but we sold it a while ago although I still maintain it for the new owner as and if required, but can't play with it the same as before!

Hope that points you in the right direction to a solution.

Medlicott Design
Helping you reach the world from your doorstep