Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Cutomizing the product price

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-22-2011, 10:39 AM
 
thygtd thygtd is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 31
 

Exclamation Cutomizing the product price

Hi all,
I opened two other threads for this issue, but no help and i assume I can get help here. The requirement is
We planned to use x-cart for a jewelery shop. The client wants to calculate the product price based on the silver's current market price per gram with making charges.
So he wants a place where he can update the price/gram & Making charges (two input fields), it should reflect in all the products' prices.The calculation will be
Product weight(will add this wen adding a product) * price/gram + Making charges.
We tried to add extra field but we dono how to do the calculation and stuffs.
Please help us with this as the plan was to open the store on Feb-14, coz of this its not yet opened and we are under pressure.

Thanks in advance!!!!!
__________________
X-Cart/LiteCommerce version v4.4.1
Reply With Quote
  #2  
Old 02-22-2011, 10:51 AM
 
thygtd thygtd is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 31
 

Default Re: Cutomizing the product price

The developer tried to do this and he was able to show the product price with the above calculation on homepage but he can't do that in the minicart and cart pages. In the other thread its said to add script to func.cart.php he dono exctly where to add the values to the taxed price. Any help would be appreciated. Thanks!!
__________________
X-Cart/LiteCommerce version v4.4.1
Reply With Quote
  #3  
Old 02-22-2011, 11:28 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default 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.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote

The following user thanks Sunray Sales for this useful post:
thygtd (03-02-2011)
  #4  
Old 03-02-2011, 09:27 AM
 
thygtd thygtd is offline
 

Advanced Member
  
Join Date: Dec 2010
Posts: 31
 

Thumbs up Re: Cutomizing the product price

Quote:
Originally Posted by Sunray Sales
I remember reading this...................., someone who know a little about SQL and tables.

I hope this helps.

Hi,
Thanks a lot for the solution. Now we tried this solution and it works perfectly. Again thank you a lot for the help. We are going to test it online. I will update the thread soon.

p.s Hi,
Sorry for not replying for the past one week. Developer went on vacation.

Thanks,
Thy
__________________
X-Cart/LiteCommerce version v4.4.1
Reply With Quote
  #5  
Old 03-08-2011, 09:51 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: Cutomizing the product price

No problem, glad it worked, let me know if there's anything else.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:56 AM.

   

 
X-Cart forums © 2001-2020