WStefanko Posted January 10, 2013 Share Posted January 10, 2013 Hello all, I am working on a jewelry manufacturing site. Since my prices are based on a daily gold market and weight of an item, is it possible to have Prestashop pricing reference an external site that would be updated daily? I know I could do a mass change but I would have to do that everyday by percentage. Right now I have all of my products on a very complicated excel file that I did not make. Thank you, Wes Link to comment Share on other sites More sharing options...
El Patron Posted January 10, 2013 Share Posted January 10, 2013 what version of prestashop...1.4 and 1.5 are very different Link to comment Share on other sites More sharing options...
WStefanko Posted January 10, 2013 Author Share Posted January 10, 2013 Sorry. 1.5.2 Link to comment Share on other sites More sharing options...
WStefanko Posted January 25, 2013 Author Share Posted January 25, 2013 @elpatron, I have figured out away to update my pricing directly to the DB at ps_product_shop in the "price" field. I had some help from my brother. My next question has to do with php/js. Would you know where to edit the "impact on price" files that would allow me to change my attribute by percentage(* or /) instead of (+ or -). I believe this is the last step before I import my products. Thank you, Wes Link to comment Share on other sites More sharing options...
El Patron Posted January 25, 2013 Share Posted January 25, 2013 (edited) I looked at this, if you wanted to change all products by a flux rate (i.e. not have a flux rate by product/category). you could do it this way: create a file call FluxRate.php add the following code and file --> classes/FluxRate.php <?php if ((!$specific_price OR $specific_price['price'] == 0) AND $id_currency != (int)(Configuration::get('PS_CURRENCY_DEFAULT'))) { $fluxrate = 10; $price = $price * (1 + ($fluxrate / 100)); } $fluxrate above is set at 10%. only does it for products, i.e. no attributes and only when in default currency then find the following code (around line 1851 for 1.4) in classes/Product.php if (!$specific_price OR !($specific_price['price'] > 0 AND $specific_price['id_currency'])) $price = Tools::convertPrice($price, $id_currency); and add the folloing after these two lines if (!$specific_price OR !($specific_price['price'] > 0 AND $specific_price['id_currency'])) $price = Tools::convertPrice($price, $id_currency); include('PriceFlux.php'); note: this is just a hack with very little testing...but basically it worked on my test machine. of course then you would just change $fluxrate to fit suit your needs Edited January 25, 2013 by elpatron (see edit history) Link to comment Share on other sites More sharing options...
WStefanko Posted January 25, 2013 Author Share Posted January 25, 2013 (edited) If I have the products portion figured out for pricing, what about attributes by percentage? I saw a post in the past that they were working on it in 1.4. http://www.prestasho...ntage-increase/ Any thoughts on 1.5? Edited January 25, 2013 by WStefanko (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted January 25, 2013 Share Posted January 25, 2013 basically the code could be applied later in Product.php....i.e. before tax calculation but after attributes... I have a module in development in this area...but not specifically for your requirement. Though (that I may in the future if there isn't another module that already does this... have you researched one of the many mass update modules? Link to comment Share on other sites More sharing options...
El Patron Posted January 25, 2013 Share Posted January 25, 2013 p.s. I looked at the link...what a mess...would take time to sort it out... personally I like to do things simple...that just seems like a lot of work... not knowing how you want to specifically fluctuate prices, the example I gave was for product base price...there are many ways to skin a cat. Link to comment Share on other sites More sharing options...
WStefanko Posted January 25, 2013 Author Share Posted January 25, 2013 Thanks for the help. My products cannot be adjusted by percentage once uploaded to the server(too much involved). My attributes change by percentage off of the price I upload. So in the products-combination generator you can put a value in the "impact on price:) field that either adds or subtracts to the base price. I am looking for where that is stored in the core. I would think you should just have to change the signs from +- to */ somewhere. Thanks again Link to comment Share on other sites More sharing options...
El Patron Posted January 27, 2013 Share Posted January 27, 2013 I have been looking at this (as opposed to doing my main work). Can you be 'very' specific how you want this to work. I understand how to do it but I need to know how you want to manage the attribute values... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now