Member
Member
BertSimons   2009-12-02, 14:43
#1

Hi, I just managed to integrate nopcart, a php shopping cart into zenphoto, a test version is up at www.bertsimons.nl/zenphototest and if you go to collectionś/zonnebrillen you can see under each image the order choices and the add to shopping cart button, in the pages menu list theré is a shopping cart page which lists all the items you did add

in the admin tab I use the image Place/Location/State/Country fields to set the arrays of avalaible choices
like Price/size/color/ordernumber as 40/S,L,XL/green,red,blue/SB12345 on the image page the exploded arrays fill up the nopcart selection menus and dropdown menus.

this seems to work flawlessly..

So here is the thing.. I use the image fields for lot of other things on sites I make, sometims for their original purpose but sometimes for other actions like in this cart..

Long time ago, before I knew zenphoto I used Pixelpost, they had a add field oiption in their admin..What I would like to get on the admin page is this too:

a button ´add field´: if clicked asks for a name of the field eg ´color´ and then automatic adds this field on the images admin tab, creates a db base field for this entry and automatic creates a function called getImageColor() or getImagePrice() etc..

Could this be done? any thoughts on how to approach this?

Administrator
Administrator
acrylian   2009-12-02, 14:59
#2

Sounds interessting. Hopefully as a plugin this time...;-) Btw, that site still runs 1.2.5 RC1....?

We don't have an "add field" but take a look at the filter-custom_data.php plugin that provides an example to use the custom data field similar ways. You will probably need to make your own filter plugin for this.

I have not tried that plugin myself yet I have to admit.

Member
Member
BertSimons   2009-12-02, 15:15
#3

my server has only MySQL version 3.23.58... I tried to upgrade last week but when running zenphoto it was blank and showed missing collums reports...spend quitte sometime downgrading and restoring the database (the one I backed up in phpmyadmin the backup plugin restore reported a failure..)
but when my licens ends in december my provider will put me on a new server..

I looked into the plugin structure tutorial.. for the twitter thing a month ago but got lost..I still strugle sometimes with the easy things let apart the Higher Coding stuff..but with some patience I could get it done I guess..

i will look into the filter-custom_data.php tomoorow!

Administrator
Administrator
acrylian   2009-12-02, 16:08
#4

Feel free to ask about the plugins. The basics are not that hard (note I am still more of a designer than a coder).

Member
Member
BertSimons   2010-04-10, 09:39
#5

ps the working shopping cart is now hosted on www.sugarbelly.nl

Administrator
Administrator
acrylian   2010-04-10, 13:19
#6

BertSimons: Is that available as a plugin or something? Of course I don't understand too much on that site..;-) (Btw, you might want to submit that page to the showcase, too).

Member
Member
BertSimons   2010-04-10, 17:26
#7

I'll comeback to you concerning turning it into a plugin.. but as of thismoment I still have no clue how to implement the custom datafilter as explained by sbillard inthis thread..http://www.zenphoto.org/support/topic.php?id=6555#post-41764

Member
Member
sbillard   2010-04-10, 19:19
#8

You should take a look at the plugin architecture document on the WEB pages. Once you have read that and looked at some of the simple samples. Just ask your questions.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.