Guest Posted September 20, 2010 Posted September 20, 2010 Hi, I want to be able to sell products for customers but need a way of being able to confirm to them how many products have been sold (or if possible form them to have a special account area which shows them this information). Kind of like when you sign up to an art site to sell your pictures or something. I've had a look around the contributions and add-ons forum but haven't seen anything suitable yet. Does anyone know of such a contribution, or is anyone else doing something similar with their store that could offer some recommendations how to achieve this? Any help would be appreciated. Thanks :)
burt Posted September 20, 2010 Posted September 20, 2010 products_ordered is what you want to use in the products table of the database. Add that to the SQL query and then spit it out as is shown in the product_info.php page.
Guest Posted September 20, 2010 Posted September 20, 2010 products_ordered is what you want to use in the products table of the database. Add that to the SQL query and then spit it out as is shown in the product_info.php page. Hi burt, thanks for your repsonse. Not sure though that I follow, sicne I don't know that much about databases. If I understand correctly I should find a field(?) called products-ordered within a table called 'products' in the database. Then how do I add that to a SQL query? Where do I find the query? And then do I find some code in the product_info.php page and do something with the bit of code? Sorry to ask so many question, bit of a newb still with certain areas :blush: . I have run a SQL query before, just a sql file that was in a contribution, so I can manage that bit - just don't know which query you are referring to.
NodsDorf Posted September 20, 2010 Posted September 20, 2010 Hi burt, thanks for your repsonse. Not sure though that I follow, sicne I don't know that much about databases. If I understand correctly I should find a field(?) called products-ordered within a table called 'products' in the database. Then how do I add that to a SQL query? Where do I find the query? And then do I find some code in the product_info.php page and do something with the bit of code? Sorry to ask so many question, bit of a newb still with certain areas :blush: . I have run a SQL query before, just a sql file that was in a contribution, so I can manage that bit - just don't know which query you are referring to. You understood what Burt was saying pretty well. OSC tracks total number of products sold in the products table, column products_ordered. His next suggestion was directing you to the point of calling that field on the product info page. Which would be a fairly easy to write SQL query to get that information, in fact in the admin section of your website this information is already available in reports > products purchased. What he didn't say was how to write the query and where to put it inside the product_info.php page. That page is the product specific page customers view. So if you're selling a "Gold Captain America T-Shirt with Pocket Protector", on that page on your site you could put it under the products model number (part number) to say something like "Products Sold: 12", 12 being the info pulled from the database. That would be the simplest way to do it. But, you may not want other customers to see how many products where sold (especially if sold was 0). Therefor, you'd need to add another statement to first check who is viewing the product, so that only the person whom you are selling it for can see that number. This adds a layer of complication. The next thing to think about is what happens if you sell a product from a person and the buyer decides to return it? OSC would still show that product is sold unless you write some code to modify that field upon receiving the return, or you manually edit the database. The last issue I see is, how many different people would have the same items? In some cases like trading cards, video games, you could have multiple sources of the same item. So, how do you determine who's item is sold and who's is not? And what if you also sell this product? That field in the database only keeps a running total with no references to where the products come from. From what I read in your post you'd love to have a page that shows the person you are selling for the information pertaining to his or her's items, like in the My Account section. This is not something standard in OSC and would likely be a custom code job. There are some Auction add-ons in the add-ons section that may have some of the code needed to do this. My personal thoughts would be to use Excel to keep track of sales, items, and ownership. If you wind up where you are doing a crap ton of selling then look into hiring a programmer to help you.. I have a lot of good ones in my friends list. Hope this helps, Don
Guest Posted September 21, 2010 Posted September 21, 2010 But, you may not want other customers to see how many products where sold (especially if sold was 0). Therefor, you'd need to add another statement to first check who is viewing the product, so that only the person whom you are selling it for can see that number. This adds a layer of complication. The next thing to think about is what happens if you sell a product from a person and the buyer decides to return it? OSC would still show that product is sold unless you write some code to modify that field upon receiving the return, or you manually edit the database. From what I read in your post you'd love to have a page that shows the person you are selling for the information pertaining to his or her's items, like in the My Account section. This is not something standard in OSC and would likely be a custom code job. There are some Auction add-ons in the add-ons section that may have some of the code needed to do this. Hope this helps, Don Looks like it would really be a custom job overall. Thank you so much for your reply, it was really helpful :) :)
burt Posted September 21, 2010 Posted September 21, 2010 I didn't really digest your original question - my idea would simply as Don says, display the number of time the product has been sold, and that number would show to everyone. Don is correct. It would need a bit of custom coding. You would need to; 1. link the product id's with the person you are selling for. Possibly use the manufacturer's functionality for this? 2. link the person you are selling for's account to their manufacturer id 3. add the code I explained above to the product info page, but also link it to manufacturer 4. check at each product info page to determine if the person is; 4a. logged in 4b. is a manufacturer 4c. is looking at one of their own products 5. If 4a, 4b, 4c are all true, then show the code in #3. If any are false, then don't show it. 6. If you did use the manufacturer option, it would also be relatively easy to make a new page in their account area that simply shows all their own products and the number of sales. That would likely work and be the least expensive option - I can see you would not have much chance of coding that yourself. If you already use the manufacturers functionality for something else, then that is not a show stopper. Means a bit more work, hence a bit more expense.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.