Harrison Posted April 14, 2006 Share Posted April 14, 2006 Hello all, As I run a Game Server Provider (GSP) I have set the product categories as each game, and the products as the number of slots. Is there a quick way to copy the products, as I have custom fields for each product. I.e. Every product under Half Life 2 requires the custom feilds Server Name & RCON Password. This would take ages to do one at a time. Is there any way I can copy and paste, then just go back and edit the name & price? Thanks a lot. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted April 14, 2006 WHMCS CEO Share Posted April 14, 2006 Hi Sean, No, there is no way for you to do this automatically. Matt 0 Quote Link to comment Share on other sites More sharing options...
Harrison Posted April 14, 2006 Author Share Posted April 14, 2006 Hi, Is it possible via MyPHPAdmin? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted April 14, 2006 WHMCS CEO Share Posted April 14, 2006 Yes, you could do it in this way. I'm not sure how experienced you are with phpMyAdmin but if you can follow this you could do it. Begin by logging in to phpMyAdmin and opening the database where WHMCS is installed, then: 1. Browse to the tblproducts table 2. Click Export and get an export of the data in the table 3. Find the row containing the product you want to duplicate 4. Copy this and remove the id field, it will look something like: INSERT INTO tblproducts ('0000000001','Game Server',........... change it to: INSERT INTO tblproducts ('','Game Server',............. This will cause it to insert each row as a new product 5. Once you've got this line of SQL, click SQL on the top navigation bar 6. Paste your INSERT code into the box and run the query as many times as you need to until you have all the products you want. You will then see them all in the products table under one product group. You can then edit them as required, moving them to the different product groups and changing the pricing. 7. Finally, you need to copy the custom fields options. To do this, you need to export the data from the tblcustomfields table. Once you've done this, you should find 5 lines with the product id field set to the same value as the product id of the product you copied above. For every new product id you have entered, you need to insert these five lines with the productid value set to their new product id. Hope that makes sense! If you get any problems, let me know. Regards, Matt 0 Quote Link to comment Share on other sites More sharing options...
eugenevdm Posted February 17, 2007 Share Posted February 17, 2007 Matt thanks a lot for pointing out how to manually copy a product with it's attributes... When you're doing a large number of products re-typing everything might leave something critical out and doing it manually in the database is rather technical! I'm going to request that you also build something like this into the UI because that way it will it easier for non-technical people to copy products. Perhaps a 'clone product' button next to the edit and delete icons. kindest regards, Eugene 0 Quote Link to comment Share on other sites More sharing options...
PPH Posted February 17, 2007 Share Posted February 17, 2007 Already there "Duplicate a Product" under the product tab in configuration. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted February 17, 2007 WHMCS CEO Share Posted February 17, 2007 PPH is correct. This topic is 10 months old now. Our development is quite rapid so in 10 months, there's quite a lot of changes! Matt 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.