Re: Cutomizing the product price
I remember reading this.
The solutions that others have provided do work, to some extent, of course this depends on your developer.
If you don't mind, I can provide a simple database solution which nearly as good as a X-Cart development solution.
Here is what I propose, you get a SQL person, or you can do this yourself, it is pretty easy.
Two options.
1) First option is to use a local MySQL database and using a SQL script to generate a csv file that has PRODUCTCODE and PRICE
In side the script you will have one variable which is the current market price of silver. im going to call it "MARKET"
You will have access to a COST field, and a WEIGHT field and a MAKING field.
So yes your table should look something like this.
PRODUCTCODE | COST | WEIGHT (grams) | MAKING | PRICE
SKU1 | 5.00 | 100 | 5000 | <run script to determine price>
SKU2 | 10.00 | 200 | 7500 | <run script to determine price>
Then your SQL query will be some simple math.
update TABLENAME set PRICE = (weight * MARKET) + COST + MAKING
If you don't have a cost field then obviously omit it.
Then you will want to output a csv file using Outfile.
You will then have a new PRICELIST csv file, this is what I would call it.
Then you upload this csv every day or whenever you would like to make a change to the prices of your jewelry.
This is the local Database side solution.
2) You can do a LIVE database side solution, by modifying the PRICE field located in the X-Cart table by doing a similar thing, but you will have to use table joins and such.
By doing it this way you don't have to upload a csv file every day, you can simply just run a script really quickly within 30 secs your prices will be all updated.
BOTH solution can work, and require NO modifications to X-Cart, however it does require someone who know a little about SQL and tables.
I hope this helps.
|