WordPress.org

Forums

Gravity Forms to make a buy and sell website (user generated content) (1 post)

  1. arslanone
    Member
    Posted 1 year ago #

    I have been working on my project on WordPress for the past ~10 days. I have questions you might have answers.

    One of the main feature is the ability of the site is to allow users to create an account and then add an entry in the DB of the product (mobile phones) they want to sell. It's kind of like ebay, but there wont be any bidding. Sellers can enter general comments about their mobile (that will be the content of WP post), and upload 4 pictures. The rest of the information about all the possible phone models will be captured by the form using drop-down lists, check-boxes etc. I do this because if I allow user to enter all details there will be spelling mistakes... and search results will be affected.

    Once sellers upload their product, the buyers will search for them giving what kind of phone they want, and then they will contact the seller via email or phone.

    So basically we can say our site will have user generated-content.

    To take care of that, I bought the Gravity forms (personal license) and used it to create a form for sellers. This form when submitted creates a WordPress post. "Additional Comments" data goes to the post content, and rest of the information about the phone is saved from the pre-made drop-downs check-boxes etc as tags for the post. Everything from color of phone, price, manufacturer (e.g Samsung), OS (Android, Symbian etc), model (Galaxy etc), version, screen size, form factor, processor, battery time etc are all stored as tags.

    Now to make a search form for buyers to search for phones, I can use this approach these guys are talking about: http://www.gravityhelp.com/forums/topic/can-i-use-gravity-forms-as-a-search-plugin

    Search form for buyers is made with pre-selected choices using drop-downs. Like there is drop-down to choose the manufacturer, then choose the OS, so on, and choose the price-from to price-upto etc.

    But then what about the fields "Price Upto", "Year From" etc on the search form? How will I make a search for that criteria? I mean I saved the "Price" as a post tag. How will retrieve all posts by apply a comparison on all the saved Prices and then list the posts from the range of Prices user specified?

    That's not all. I looked into the WP database. Gravity form plugin is saving the whole fields and the captured data in wp_options table in "serialized" form: http://wpgarage.com/tips/data-portability-and-data-serialization-in-wordpress/ and I can't run SQL queries on it. I can use unserialize() or maybe_unserialize() function and then use PHP code to extract data from the array (that's what I have read, I have not actually done it). And I read this is slower than DB queries. What will happen if suppose lots of user start making searches?

    Another thing bothering me is that there are say, may be 40 manufacturers, when one manufacturer (say Samsung) is selected, then there are may be 50 phone models for Samsung, and when Galaxy is selected, then there are may be 10 variations for Galaxy. In gravity forms I have to create a drop-down list for each of these, and choose the (conditional) hide option that says that "hide this Samsung models drop-down list", and show it only if user selects Samsung in preceding drop-down list. If user selects Nokia, then show Nokia models drop-down list. And then, something like show variations (drop-down) of "Galaxy" only if Galaxy was selected by user in upper drop-down list. Now if you do the math, there will be lots of drop-down lists, and all will be *loaded* when "Sell your phone" page form loads because Gravity form is made that way. It has conditional logic option to hide fields but their HTML code is loaded anyway and just not visible because of a CSS display:none option. And so my "sell your pphone" page will be very slow to load when phones by all manufacturers are added.

    My question: Am I making this site with the wrong approach in WordPress, and can it be made easily in WordPress using a different approach?

    Or will it be better if I try to make it in something like Django or Rails? Problem with that is that I don't know Python or Ruby and I'll have to learn one of them (depending on which framework I choose). If I have to choose on of them I will choose the one that is easier to learn/understand in a ~5 month time. I know 5 months is not nearly enough time. But if WordPress will make me cry lots of tears in the next three months making this site, and I will end up with a no-good-just-a-hack web app, then it's better that I work day and night on Python/Django or Ruby/Rails and make something that's nicely done....

    Am I making any sense? :(

    Please advise. I need it badly. Share your thoughts.

    -- arslan

Topic Closed

This topic has been closed to new replies.

About this Topic