You are here:  » Adding a manual input form with approval process

Support Forum



Adding a manual input form with approval process

Submitted by thepricesite on Tue, 2006-11-14 14:50 in

Hi,
Just wondering whether it is possible to add a php form whereas i users can register on the site, add an item for sale, add the price and then press submit. Onced submitted it would then sit in an approval process like the reviews currently.

Any ideas on how i could do this would be welcome!!

Regards,

Michael :)

Submitted by thepricesite on Tue, 2006-11-14 16:17

Think i've managed to work it out...
I've got some other php code which has an HTML form that once filled in outputs an XML file which then can be registered by the system.

Your thoughts are welcome though...

Michael @ ThePriceSite

Submitted by support on Tue, 2006-11-14 16:27

Hi Michael,

That's a good way to do it as it records the data separately to the database and means you don't have to write lots of code to manage user items as well as datafeed products...!

Submitted by thepricesite on Wed, 2006-11-15 09:35

Yes, the approach seems to work :)
It will give me the ability to provide shops etc the ability to add products in manually and then i can approve the process. Once approved it will import the products into the system.

If anyone would like the source give me a shout.

Michael @ ThePriceSite

Submitted by MikeyC on Wed, 2006-11-15 11:57

Yep, i surely am interested Michael.
Is there a way to squeeze some payment method in ?

I was thinking of a page where shops can add their xml/csv file and register the feed. Once registered, payment has to be made before the feed can be imported. Ofcourse the amount to be paid should be dependant of the total of products which will be imported and the time (a month, two months) the products should be shown on the site.
How would one go about this?

Mikey

Submitted by Eddie on Wed, 2006-11-15 13:15

David,

This sounds great - can you "make it happen" ?

Eddie

Submitted by chrisst1 on Wed, 2006-11-15 17:22

David

We would also be very interest if you could put together this add on.

Chris

Submitted by MikeyC on Wed, 2006-11-15 18:12

Michael,

Do you have the source for me?

Submitted by thepricesite on Fri, 2006-11-17 11:20

Morning all,
There is no reason why some sort of payment process could be bolted on. I was looking at adding a PayPal function where my customers could have a logon, add their products and pay.

Still in my proof of concept stage at the mo - but i will add the code over the weekend as its on my other laptop which is sat at home! doh!

With some help from you php gurus this functionality might prove to be a nice feature.

Have a good weekend,

Michael

Michael @ ThePriceSite

Submitted by Jannii on Mon, 2006-11-20 18:31

I'm looking for something along these lines for an Add to Wishlist option. I've got a separate php system to manage the wishlists with a built-in user registration/login page but I need to have a link or button on the product page which calls the wish entry script and passes the product details to it as parameters.
I have got some javascript to write the link and call the form but I'm a bit confused about how to pass the parms to js and to receive the parms in PHP.

Could anyone give me some tips on how to achieve this please ?

Submitted by support on Mon, 2006-11-20 19:55

Hi Jannii,

There are several ways to pass parameters via JavaScript so it's a bit difficult to suggest what would work best without seeing what your JavaScript looks like, but the basic principle is the same.

Taking the product / wish list example; then assuming that you want to add link code to the product page you will be looking at making changes to html/product.php

On this page; all the product information is in an array called $mainProduct. For example; you can access the product name as follows:

$mainProduct["name"]

Now, before getting into JavaScript; let's use a Google Search link as an example - so we want to create a link on the page to find more information about this product on Google. The code might look like this:

<a href='http://www.google.com/search?q=<?php print urlencode($mainProduct["name"]); ?>'>More Information On Google</a>

The urlencode() function is used to make sure that all the characters in the product name are safe for use on a URL.

In terms of receiving the parameters in another PHP script; here's a similar link but to your own script on another server:

<a href='http://www.example.com/wishlist.php?item=<?php print urlencode($mainProduct["name"]); ?>'>Add To Wishlist</a>

In this casel you would access the product name within wishlist.php by accessing the $_GET super global - this is where variables that have been passed in via the URL are accessed:

wishlist.php:

<?php
  
print "You have wished for ".$_GET["item"];
?>

I'd need to see an example of how you are using JavaScript to create the link in order to show you how to get the product name into that, but I hope this helps with the general idea.

Cheers,
David.

Submitted by Jannii on Tue, 2006-11-21 12:25

Hi David,

I've played about with the code you suggested and it seems to do what I want without bothering with javascript, thanks.

Jan

Submitted by Eddie on Thu, 2006-11-23 13:23

Michael,

Just bumping this back up.

Regards

Eddie

Submitted by thepricesite on Fri, 2007-02-16 12:10

Must apologise for not getting back to you Eddie. Been out of the country on holiday.

Drop me another email and i'll send over my code as it stands. It needs some work but it does appear to work.
I'm playing with an excel version too so that merchants and sell goods for free.

Michael @ ThePriceSite

Submitted by thepricesite on Wed, 2007-02-21 08:49

Eddie - moving properties at the moment so i haven't got internet access at home. I'm going to get this upload on Saturday, thanks to David's note i can move on with it and drop it on here for you all?

Michael @ ThePriceSite

Submitted by jonny5 on Tue, 2008-01-15 12:26

Hi Michael , any chance of this scipt so I could use this , no need for the payment option just the script to submit single items for sale.

thanks in advance

Submitted by MikeyC on Mon, 2008-01-21 12:08

Any chance of sharing what you cam up with till now ?
I Would surely like to implement such a form on my site for potential customers, instead of having to work with datafeeds from affiliate networks only.

Regards,

Mikey

Submitted by jonny5 on Mon, 2008-01-21 14:41

as u can see i was also interested in this.

anyway i have had a search and found the below , i havent tried it yet but it sounds like it will do what is needed.
im gonna give it a go tonight
http://scripts.filehungry.com/product/xml/form_processors/xml_survey

Submitted by James Warren on Mon, 2008-02-11 14:37

Has anyone had any joy with this mod yet? I could really do with this fuctionality right now.

James Warren
http://www.thehighstreetonline.com

Submitted by jonny5 on Mon, 2008-02-11 14:59

no still no luck , was hoping Michael would have seen this thread and posted the mod