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?
Comments
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.
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!