Search the Community
Showing results for tags 'conversion'.
-
Years ago before Wordpress had even been invented, I started work on a site providing information about my local region of New Zealand. Back then, most people were on dialup, and if you wanted a CMS you had to roll it yourself - if you could find a host that supported server scripting at an affordable price. This year, with a quiet patch with essentially no paid work, I finally decided it was time to make the move from a home-grown CMS using an obscure scripting language to something more modern, so I could spend more time adding content and features, and less time maintaining the core CMS. www.marlboroughonline.co.nz I love Processwire because it works the way I think, and when I was first introduced to it, I was up and running within 20 minutes of reading the documentation, vs several hours reading Wordpress documentation, and still not entirely sure how to create my own fields and create a theme from scratch. I come from a database programming background, particularly Microsoft Access, so being able to make fields and add them to a form or report, is the way I'm used to working, although it took a bit of getting used to Processwire not adding fields to a table by default, although I see Pro-Fields or custom field types can achieve this. (I haven't used Pro-Fields in this project as I'm essentially on a zero budget). The site itself doesn't use anything particularly fancy. I use the following modules: Map Marker Form Template Processor Social Share Buttons (With my own colour version of the button icons) AIOM+ (This is particularly handy as I'm using a customised version of Bootstrap, and it handles compiling all the LESS files) Jumplinks The biggest task was importing all the content from my existing CMS, but since I wrote it, it was easier than dealing with some third-party CMS. The site had been around for a long time, and had numerous inward links including a number from Wikipedia, and I didn't want to break them in the conversion. If you're converting a site to Processwire with a URL structure that can't be replicated in Processwire, Jumplinks is a must-have module, as it handles complex URL redirects very nicely. The site has quite a bit of content, much of it which needed updating in addition to changing the CMS, so there might be odd bits that don't look right, but that's certainly not Processwire's fault.
-
Saw this on ghacks.net. I've never seen a conversion site so comprehensive. https://gchq.github.io/CyberChef/cyberchef.htm
- 7 replies
-
- 5
-
- conversion
- cyberchef
-
(and 3 more)
Tagged with:
-
I installed ServiceCurrencyConversion and it's great. I was wondering if any of you by chance had any experience with using this as I would expect it would often be used, to search by price... in your currency. Right now I have products that each have fields price_currency and price_amount. So each has a native currency. I am able to show the price in each currency we currently support on our listings index by way of this function: function currencyConvert($page) { //echo $page->id . '<br/>'; $cc = wire('modules')->get('ServiceCurrencyConversion'); $current = $page->price_currency->name; $amt = $page->price_amount; $currencies = wire("pages")->find('parent=1135,include=all'); //echo count($currencies) . '<br/>'; $converted = []; foreach($currencies as $currency) { //echo $currency->name; //if($currency = $cc) continue; //$converted["$currency->name"] = $cc->convert($current, $currency->name, $page->price_amount); //if($current != $currency->name) { //echo " Set: $current Now: $currency->name Amt: $page->price_amount "; $converted[$currency->name] = $cc->convert(strToUpper($current), strToUpper($currency->name), $page->price_amount); $amount = $currency->name == 'eur' ? number_format($converted[$currency->name], 0, ',', ' ') : number_format($converted[$currency->name]); $converted[$currency->name] = wire("pages")->find("parent=1135, name=$currency->name, include=all")->first()->title . $amount; //} } //print_r($converted); return $converted; //echo '<br/><br/>'; } So in my listings index I have: foreach(wire("pages")->find('parent=1135, include=all') as $currency) { if($currency->name != $item->price_currency->name) $price .= ' / ' . currencyConvert($item)[$currency->name]; } That outputs the price in every currency that isn't the default for the listing (which is already output). So I already have a search in place for listings that searches by the price_amount. I want to incorporate the different currencies in my search, while not excluding results based on their set currency. The way I have this set up currently works, but incorrectly, as it doesn't restrict listings based on their currency conversion. Now that I can convert them I want to fix the search feature to accommodate this. So how can I do this? I would think to maybe store a separate price_amount per currency, with a default set (to base other values from), but this does seem a bit tricky... Right now only 3 currencies are supported but if it grows to be a large amount it might become unwieldy. If that's the right way to do it though, so I will. Or, just leave the fields as-is, and go by the chosen currency in the search, returning all results that match the amount in that currency. This is what I would like to do because it seems simpler. But then I worry about performance... This means every search would have to convert the price for potentially almost every listing, and that's before even returning a set of results!(?) Like, you would have to search, with a currency and max. and/or min. amount set for price... then that search would have to first process the converted price for every listing that fits all the other search criteria, right (potentially all), and then return the values that match the price range in the chosen currency. That sounds like too much to me. Also obviously outputting the price in every currency we have would get too lengthy so I want to be able to target a single one efficiently. You see my dilemma? Anyone more knowledgeable have any advice, please? Much appreciated.