Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there.
I would love to see this module ported to D6. I would be happy to assist in this.
If anyone else are interested perhaps we could join forces?
Thanks,
Comment | File | Size | Author |
---|---|---|---|
#9 | cafepress-6.x.tar_.gz | 14.4 KB | jriedel |
#4 | cafepress.zip | 13 KB | enzipher |
Comments
Comment #1
junedkazi CreditAttribution: junedkazi commentedhi,
I am interested to join in and contribute
Thanks
Juned Kazi
Comment #2
Kbrooks CreditAttribution: Kbrooks commentedI'm interested in working on this. Do we have any sort of "plan" at this point?
Kami
Comment #3
junedkazi CreditAttribution: junedkazi commentedI have put a request to Rooey for adoption for the cafepress module .
Once he responds we will start working on it .
Thanks
Juned Kazi
Comment #4
enzipher CreditAttribution: enzipher commentedGreat! It seems like I got the ball running. I would be happy to make some testing.
Actually I tried the Deadwood module. I attached what came out of it. Perhaps it's a good start.
Thanks
Comment #5
jriedel CreditAttribution: jriedel commentedI'd like to see this module working. However I'm new to Drupal and might not be able to help take over support of the module. I thought I'd see what I could do just for my own site.
I just pulled down that zip and tried to get things to work. Wow, this is going to take some work. I got the admin menus working, fixed a few issues that the class name it was looking for in the code doesn't match the doc. However it still didn't pull any products. The optional class assumes things about the Cafepress website. It can be changed to match, but I think one will be constantly fixing it when Cafepress changes something.
I think the best way to take care of the situation is to use the search API that Cafepress has. That would make it better in the long run.
The first thing to do is add an setting for an API key, that should be easy to do. I'll look at some code from another module that does API calls to a site. It has the added advantage of caching the API calls nicely in the database.
The other thing that should be done is to move the HTML out of the module file and into a tpl. This would make theming it easy.
Comment #6
expatme CreditAttribution: expatme commented+1
Comment #7
ajayreddy CreditAttribution: ajayreddy commentedI look forward to a stable release of this
Comment #8
jriedel CreditAttribution: jriedel commentedI just got a good version of this working under D6.8. Give me about another week or 2 and should have it working real well and I'll zip up what I have and post it here.
Comment #9
jriedel CreditAttribution: jriedel commentedHere it is. Still a lot needs to be done to get rid of HTML in the module and allow a lot more theming. The code also needs some cleanup, proper indenting and such, but it works. The random product block works and so does the full store page.
No need to download anything else, no need to create directories, that's all taken care of for you.
Now all someone has to do is to take over support, finish the cleanup and get the code loaded into CVS.
Comment #10
lionheart8 CreditAttribution: lionheart8 commentedIt is great to know something for Drupal 6 is in the works. I wish i could help but I am not that much of a programmer. You do have my moral support, though. :)
Gonna try uploading this to my D 6.8 & see what it can do.
Comment #11
gottsman CreditAttribution: gottsman commentedThanks for your time and effort to create a 6.x port.
I tried installing your development build into a brand new 6.9 install. After installing the website just quit working with blank pages. Are there still plans to finish the port to 6.x?
Comment #12
jriedel CreditAttribution: jriedel commentedSorry to hear about your problem. Very hard for me to tell what the problem may be. It's working fine for me on a 6.9 site. But I'm not a Drupal coder, I just play one at night.
It sounds like some PHP error in one of the files. Do you have access to the webserver/php logs?
Can you check the ownership and permissions of all the files from that got unpacked?
Let's try this first. Get to a command prompt and go to module directory and type
php cafepress.install
php cafepress.module
You should get nothing back from either one. If you do then what is the message and what version of PHP do you have? I have 5.2.6.
Next try going into the classes directory and try
php cafepress.cafepress.class
php cafepress.product.class
Same thing, any messages?
As for finishing the port, I have no idea if the person in charge of this module will take it further.
Comment #13
sykedya CreditAttribution: sykedya commentedHI
I got this to work with very little effort, Thanks :)
Just a few things i was wondering if you had an idea about... I need to change it to AUD instead of the default USD. Any ideas how i would do this.
Also if i try and change the thumbnail size from 100 it gives me blank pages. not that there is anything wrong with 100size for thumbnails.
Cheers for any help.
Thanks
Comment #14
jriedel CreditAttribution: jriedel commentedAUD/USD and other things like that and theming is where the module needs a lot of help. You can try going into cafepress.module and look at line 342. That has the $ on it and the price, you can change to read whatever you want.
I just took a few stabs at what "I" thought was a layout that worked well for me in theme I'm using. Someone that really understands theming needs to make the process much more generic.
That's odd on the image size. Mine is set to 150, I just changed it to 240, then to 100, then back 150. It worked everytime. Can you look in the database at the cache_cafepress table? That shoud have the raw data from API call in it. I'd like to know if it provides images for anything other than 100px.
I based those sizes on the admin page on what I was seeing in the data CP gave me when testing. I wonder if not everyone is being given all of those sizes.
Comment #15
sykedya CreditAttribution: sykedya commentedIt might have something to do with me only having a basic store.
As for the pricing it grabs it in USD so i guess unless it can be grabbed at the converted rate ill have to leave it at that for know.
Thanks for the quick reply. I will look the database and get back to you when i get the chance!
Cheers
Comment #16
lionheart8 CreditAttribution: lionheart8 commentedHi
I have been following this with a lot of interest.
Following the following instructions for the Drupal 5 version
involving that class from that website, I am able to display products like at that temporary link:
http://www.orbit.890m.com/
Now, regarding the D6 version, I installed it at http://www.orbit.890m.com/d6 but noted during installation, one is asked for an API key.
I do not have one, but I found some confusing statements about it in the Cafepress forums. Some people said they no longer give out API keys, one led to a link requiring practically signing up for an affiliate program & agreeing to the TOS before getting the keys.
I had no plan of signing up fpr an affiliate program for now. Does it mean I cannot use the D6 version without the API key?
Without it, under "Stuff from our store" I just get a $ sign & "more".
I even tried adding class.cafepressbox.php which works in D5 after I included the necessary images, but it does not seem to work here.
Is there any chance of making it work for D6?
Thanks & regards
Comment #17
jriedel CreditAttribution: jriedel commentedMine is just a basic store, so I don't think that is the issue at this point. I'm not sure how to take care of the USD/AUD issue if all the CP API data is giving you is USD. I didn't see it the raw data, but for your store they might also list the price in a native currency.
As to API key. Sigh.....
Yes I ran into the same thing, E-mailed them, and got back an auto response that they nolonger give them out. Hoever in a few places CP people said if you are having trouble, try this API key. So yes, you need to put in an API key.
Look in the README.txt file I supllied, you should find what you need.
As to the class.cafepressbox.php, I tried that at first with D6 and got nowhere fast, and I didn't want to have to add images. So for my own needs I re-coded to us the API.
Comment #18
RachelNY CreditAttribution: RachelNY commentedI am not sure what is going wrong for me. I uploaded and enabled the module. Left the default image directory, put in the API key, my store ID, etc ... the cafepress/onlinestore page shows up fine, but it doesn't show any images/products ... do I need to create an images/cafepress directory? Do I need to actually upload images? Is there something simple I am missing here or any dependencies I am unaware of?
Any help would be much appreciated!
Thanks,
Rachel
Comment #19
RachelNY CreditAttribution: RachelNY commentedSome progress, it will only work if I do this:
Line 62 of cafepress.cafepress.class
Any ideas? Is there some cache setting I need to tweak?
Rachel
Also, I also had to create the /sites/default/files/images/cafepress directory manually....
Comment #20
jriedel CreditAttribution: jriedel commentedShouldn't be anything you next set related to the cache. Can you see if the install created the cache table in the database?
Or how about putting a debug print statement in the cafepress_cache_get function in cafepress.module to see where things are failing.
I have some code to create the image directory, but thinking about it a bit, it might have worked for me because of exsisting protection settings and how Apache is setup.
Comment #21
RachelNY CreditAttribution: RachelNY commentedThere is a cache_cafepress table which is empty.
cafepress_cache_get:
print $params; // Shows: "Array"
print $class; // Shows: "productlist"
print $method; // Shows: "ByStore"
Is there something else you want me to look for?
Comment #22
ernlilley CreditAttribution: ernlilley commentedFolks,
I'm really glad you did this for Drupal 6. I'm just getting started with Drupal, so I've got my hands full converting a site for a client, and they really didn't want their CafePress to be linked off from the site. This was a big help.
When you click on a product, it takes you to the external CafePress page. I assume that's just the way it is and you can't actually keep it in the skin for the entire transaction. If I'm missing something though, please let me know.
Either way, it's been a big help.
Ern
Comment #23
jriedel CreditAttribution: jriedel commentedI'm sure they would be some ways to do it. You could open the Cafepress stuff in an iframe. Much more than that might require a premium store at Cafepress, then using a lot more the API to create orders. A big, big task to code and test.
Comment #24
ronjo84 CreditAttribution: ronjo84 commentedI keep getting the following error:
Fatal error: Class 'cafepress' not found in /home/askronco/public_html/bumpert/drupal-6.12/sites/all/modules/cafepress/cafepress.module on line 293
Help?
Comment #25
venusrising CreditAttribution: venusrising commentedAnyone get any news about this module vesion 6
Comment #26
venusrising CreditAttribution: venusrising commentedWorks great. I got an API key from Cafe Press with no issue someone should commit this code.
Comment #27
venusrising CreditAttribution: venusrising commentedOne thing to note is that Block generation time is about 145ms which is quite huge. I do not have caching enabled as this is too dynamic to do so. This looks great but the block generation time may be a downfall.
Comment #28
jriedel CreditAttribution: jriedel commentedNot surprised about the block time. I had no use for that so in the port I made I never tested that much, just that it seemed to work.
Comment #29
venusrising CreditAttribution: venusrising commentedI wonder how we can speed up the block generation time. The module works great however Jreidel, thanks for porting it!
Comment #30
jriedel CreditAttribution: jriedel commentedWithout using some PHP profiling tools, which I don't have, it would be hard to find the issue.
It's been while since I did any work on it, so I went back and looked at the code. The only difference between block display and the page display is that the block picks random number and displays just the one random item from the filled up array of data.
That array is filled completely not matter block or page. So what would be intersting to know if someone has the time to test it.... Does the block generation time match the page mode genteration time?
Anyone that wants to take the code and give it a facelift, go right ahead. It was a first attempt at any real PHP/Drupal code, so I'm sure it has a lot of room for improvement
Comment #31
venusrising CreditAttribution: venusrising commentedWell, you did a great job and it looks nice. I did not know that there was a page for this module so when I have a chance I will check generation time. Wish I could be of more assistance.
Comment #32
ascii122 CreditAttribution: ascii122 commentedThanks for doing this module. Seems like it's working great!
Comment #33
ebeyrent CreditAttribution: ebeyrent commentedI have created a Drupal 6 branch based on the code in #9. Thanks for all your efforts with this!
Comment #34
ebeyrent CreditAttribution: ebeyrent commented