Seller Items Are Limited To Set Amount
Our website features an online marketplace for buyers and sellers. Sellers are given an opportunity to sell up to 100 products when they signup. As a business relationship develops, I want to be able to change the limit to 300, 500 or 1000 products. At this present time, there is no script in the SQL statement setting the limitations of products created. I have a field in the accounts table called sellerlimit, which has a default of 100. This data will dictate the product count restrictions.
When a seller signs in, he is redirects to the sellers account page.
[url removed, login to view]
To sell an item, the seller would click the "sell item" link and arrive at:
[url removed, login to view]
I need a script added to the SQL statement sellitem page that would stop the page from inserting a new record when the SUM of the seller's products go above 100 records in the products table.
Each seller has a unique account number in the accounts table called accountnumber. When a new product (record) is inserted into the products table, the accountnumber is also inserted into the [url removed, login to view] field. Products table also includes a column called products.one. It has a default of 1, when a record is created. I'm unclear whether it's needed to count the records in the products table but have it included just in case.
Scripting Language/Database: PHP MySQL
THIS IS THE CURRENT STATEMENT:
$query_rsSellitem = sprintf("SELECT [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view] FROM accounts, products WHERE [url removed, login to view] = %s AND accesslevel = 2", GetSQLValueString($colname_rsSellitem, "text"));
Send me a private message regarding your approach to making this work and the results of the work in completing this project here.
Above, I have provided what I believe is all the information regarding this project with exception to login information to the FTP & database. Please base your bid on this but I will be happy to answer questions and exchange correspondence through this website's personal message board during the development of this work. Try to keep in mind of time zones differences if responses aren't immediate.
1) Please include a script on the seelowprices.com/sellitem/ page that includes the sellers current "Product Count". The text and placeholder is already there. I have already added the "Account Limit" which includes live data (bindings) from the accounts.sellerlimit field which is complete. This will help the sellers ahead of time plan in prioritizing which items are most relevant.
2) WHEN THE ACCOUNT REACHES MAXIMUM: Activate the text shown in my attached image seller-reaches-maximum.jpg
This sellers account has reached the maximum limit of products. Please contact <a href="/contactus/">Customer Service</a> regarding increases in webhosted inventory. Go back to my <a href="/sellers/">account</a>.
3) WHEN THE ACCOUNT REACHES MAXIMUM: Have the title field, category field and Submit button disabled.
Bu iş için 7 freelancer ortalamada $41 teklif veriyor
Ready to start. Please check PM for the explanation.