-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Yes, everything is integrated in one install. I haven't yet decided what a 'basic shop' looks like, i.e. what to install and what to make configurable. Looking at other systems, their offerings differ quite a bit. This is a conversation I was planning to have with beta testers but we can open it up to the whole community to discuss.
-
I hope I didn't come across as shutting the door on the suggestions here :-). I was just pointing out a few realities. Like I said, I don't know much about marketing. It would be wise to listen to those who do :-). So, yes, I am still listening and by all means, let folks continue to chime in please.
-
Or you could just use a RuntimeMarkup field ? with WireHttp() and $cache. I'd never heard of SmugMug before ?. Here's a demo for how this could be done in RM. We are mimicking a ProcessWire image field by using similar markup and including Image field's JS and CSS. Please see the notes in the code. We are also caching the response for 1 hour so we don't hit SM limits. I created a free 14-day trial account for this. Here it is...I couldn't think of a better name for it ?. As you can see in the demo video, we are pulling the exact images. The code could be improved. You could get all fancy and even push changes to SM using Ajax, for instance. Please see the examples in RM docs. This code goes into the file you are rendering. <?php namespace ProcessWire; // set PW image assets $url = $config->urls->InputfieldImage; $config->styles->add($url . "InputfieldImage.css"); // @note: JS just in case you need it but in that case, you will also need Magnific, etc $config->scripts->add($url . "InputfieldImage.js"); // get cache only if it’s less than or equal to 1 hour old (3600 seconds) // @note: cache is unique for this page $cacheName = "smugmug_{$page->id}"; $images = $cache->get($cacheName, 3600); // no cache or expired, request data from smugmug if(is_null($images)) { // Get an instance of WireHttp $http = new WireHttp(); // we want JSON, so set headers accordingly $headers = array('Accept'=>'application/json'); $http->setHeaders($headers); // an example public album $url = 'https://www.smugmug.com/api/v2/album/xxxxxx!images'; $data = array('APIKey'=>'12345678900987654321');// API key $response = $http->getJSON($url, true, $data); $images = $response['Response']['AlbumImage']; // cache the response, and expire after 1 hour (3600 seconds) // @note: only caching the albmum! $cache->save($cacheName, $images, 3600); } // outer list markup for images (c & p from PW with slight modifications) $out = "<ul class='gridImages ui-helper-clearfix ui-sortable'>"; // iterate through response. // @todo: You might want to do some error checking first foreach($images as $image) { // file size to kB $fileSize = ceil($image['OriginalSize'] / 1000); $out .= " <li id='file_{$image['UploadKey']}' class='ImageOuter gridImage ui-widget'> <div class='gridImage__tooltip'> <table> <tbody> <tr> <th>Dimensions</th> <td>{$image['OriginalWidth']}x{$image['OriginalHeight']}</td> </tr> <tr> <th>Filesize</th> <td>{$fileSize} kB</td> </tr> <tr> <th>Description</th> <td><small>{$image['Title']}</small></td> </tr> </tbody> </table> </div> <div class='gridImage__overflow' style='width: 130px; height: 130px;'> <img src='{$image['ThumbnailUrl']}' alt='{$image['Caption']}' data-w='{{$image['OriginalWidth']}}}' data-h='{{$image['OriginalHeight']}}' data-original='' style='max-height: 100%; max-width: none; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0px);'> </div> <div class='gridImage__hover'> <div class='gridImage__inner'> <label for='' class='gridImage__trash'> <input class='gridImage__deletebox' type='checkbox' name='delete_images_{$image['UploadKey']}' value='1' title='Delete'> <span class='fa fa-trash-o'></span> </label> <a class='gridImage__edit' style='line-height: 130px;'> <span>Edit</span> </a> </div> </div> </li> "; } $out .= '</ul>'; $out = "<div id='my_album'>{$out}</div>"; return $out; Screenshot Video Demo
- 6 replies
-
- 12
-
-
RE Branding Thank you all for the conversation so far ?. Just some quick pointers/thoughts: There are two areas of branding that have been referred to so far. The first one is what users see when they log into the backend. The second has more to do with selling the product, aka marketing. Regarding the first one, unlike the present Padloper, the name Padloper will not appear anywhere in the shop. Btw, you will be able to call your shop whatever you want - store, shop, blah blah. So, reports, taxes, etc, will all just be part of the shop. No extra shop links outside the shop itself. Regarding the second issue of marketing, I am not an expert, so I'll pause and have a listen. However, @teppo is right. The name does already have some brand value and the product 'has been selling itself', so to speak. I am not saying things cannot be improved. In addition, and I am just thinking out loud here, I don't have the stats for how many people have come to ProcessWire because of Padloper. My gut feeling is probably not that many (if any at all). On the contrary, I think most Padloper users (I am referring to devs) were already ProcessWire users and needed an eCommerce solution. Of course, we can always aspire for the former case (Padloper attracting people to ProcessWire), but that's probably a longer term discussion.
-
Are your tests not working? It works here as expected. When I loop through $arr, the text for item with identifier=456 is "some other text";
-
Once you get to know the system, you could write some scripts to match fields and copy things over. You could probably use the new Padloper API to do this, e.g. the import functionality if you need to import products.
-
You mean like this? Seems you missed the eligibility screen ?. The GUI is not yet complete. The details are: Specific Groups of Customers New customers (have never bought something) Returning customers (have previously bought something) Abandoned checkouts Customers from own country (will probably change this to 'from specific countries') Newsletter (customers signed up to newsletter - this may not make it in the first release though + I haven't decided whether newsletter should be part of Padloper or not or third party, etc) Specific Customers Here you will select specific customers. These will have to be registered customers
-
This hasn't crossed my mind but it is something worth considering now that you mention it. Let's hear what the community thinks. If the discussion gets a bit long we can move it to its own topic.
-
If by this you mean stuff like "10 orders placed today..." or staff to staff messaging, etc, that's already planned and partly modelled. Notifications will mainly be shown on the main landing page and on orders. I haven't started on the GUI yet, that's why there is nothing to see currently :-). Most likely this is what we'll tackle last, before beta release.
-
There will definitely be conflicts, I am afraid. For instance, the module Padloper.module in Padloper 1 vs Padloper 2 are two different things + ProcessWire/PHP won't allow two classes with identical names . Do you have a specific need to run both the old and new versions?
-
Quick follow-up to last announcement regarding Discounts. Here's a screenshot ( @szabesz look away now ? - giant padding! will work on it later) of the Discount bulk view/edit screen (WIP). Discounts bulk view/edit
-
That's where Dart comes in :-). Have a look at the docs and examples. With Dart alone, you can build anything from backend servers, console programs and anything in between. Erm, no you don't. Look at the real world examples/showcase. We are talking Alibaba, Reflectly, Hamilton Musical, and the likes. For iOS we have Cupertino Material design. I am not saying these alone are enough to go by but so far, and I have done extensive research, I have yet to come across anyone mentioning that they have to maintain two code bases. In fact, they all say quite the opposite - they have done away with two code bases and their UI renders exactly as they intended in their targeted platforms. How so? The only thing I don't like so far is the styling and structure baked right inside the widgets. I think flutter had the advantage of learning from other solutions and picking the best bits and improving on the not-so-good bits. I am not a zealot (yet :-)), but the more I dive deeper into Dart and Flutter, the more I get convinced that Google got this one right :-).
- 35 replies
-
- 3
-
-
-
It's amazing how much progress they've made since that article. was written For those thinking of diving into Flutter/Dart or even just Dart, don't be scared ?. An advantage we have as PW developers is the OOP side of PHP. Coupled with CSS (styling, box model, etc) and HTML (widget-like structures) plus JavaScript, it makes the dive into Dart (and other [modern] languages) not-so-painful. So you call it a Map we call it an Associative Array (or Dictionary in Python). You call it a List, we call it an Array. So you have collection.map()...that looks familiar. It's dot notation and I've seen map in JavaScript. We can do that, but we also know $this->something....etc. The flutter widget inspector looks really cool, btw. I am also happy that my code of choice, VSC, has Dart plugins and is mentioned in the official Flutter/Dart pages. Me and my ramblings...?
- 35 replies
-
- 3
-
-
Aah..I see. Hmm, let's have a think...
-
Actually, some systems (e.g. Shopify) have it as an exclusive. I'm not sure I follow. Please expound. I am confused myself ?. Is it the 'Gets Quantity' that is confusing or the demo? Thanks!
-
A year or so later, I have seen the future. Actually, I just stumbled upon it. Just when I was diving into Angular + TypeScript + NativeScript for mobile apps, I recently came across this thing, Flutter. I have been totally blown away! The last time I was this excited was when I discovered ProcessWire :-). Long story short, before I ended up here, I was looking at Kivy and BeeWare. I managed to pick up Python along the way. Kivy looks promising. I am interested in both mobile and desktop apps and it ticks those boxes. Then along comes Flutter and wow! Cross platform, write once deploy everywhere (iOS, Android, Embedded, Windows, Mac). It's still early days but I am totally convinced. I was a bit hesitant because it is a Google project (you know, their history of killing off projects...) but since it is open source and there are some big players already involved, I am sold. Flutter compiles to machine code! It comes with lots of widgets out of the box, both for iOS and Android. You can also ask it to compile to JavaScript (like TypeScript can and does). To program in Flutter you use Dart, a language developed by Google. I came across Dart a while back. Back then, it was considered a dead language. It has made a resurgence, thanks to Flutter. If you know your OOP and JavaScript, it is very easy to pick up, in an hour or so. If looking at Flutter, have a look at Hummingbird as well. What do you folks think? Anyone used Flutter before?
- 35 replies
-
- 9
-
-
News Update - 26 May 2019 Discounts GUI Most work since the last update has gone to the discounts GUI. I also took the opportunity to trial the Tabbed interface suggested by @szabesz. I think I like the results. There are some crazy JS/CSS issues affecting the layout though. They seem to be coming from the ProcessWire navigation. Sometimes the padding is affected. This realigns correctly when you hover your mouse over the ProcessWire navigation. The dev inspector shows some dynamic activity going on, meaning JS. I'll post this in a separate post in the forums. Please note that this is still WIP. There are 4 types of discounts, each of which can be further refined by other factors including usage limits per order, globally, per customer, minimum requirements (purchase or amount), customer eligibility, etc. Discounts can be applied to specific products or categories or to the entire order. Percentage discounts Fixed amount/value Free Shipping Buy X Get Y Currently, discounts have to be created manually by the shop staff and customers have to enter a discount code at checkout. In future, we'll consider adding automatic discounts which will kick in if certain conditions are met. Here's a short video demoing the creation of discounts. Thanks.
-
The API will change a bit. Everything goes through Padloper (the new module/class I talked about in the post above). An Order Object will contain everything about the order stored in several properties. For the curious, there are two main fields for an order (outside order ID, etc). One field is of type Order and contains the overall data about an order, e.g. total price, total quantity, total shipping, customer name, customer address, order status, etc. The second is for individual items (also called list items) in an order. This will hold data about each item (product) in an order, e.g., the price, quantity, fulfilment status, variant id, tax, etc. To send order data to your endpoints will be as simple as this: // get an order $order = $padloper->getOrder($id); /* overall order data */ // total price/cost $order->totalPrice; // total discounts applied $order->totalDiscount; // totalShipping $order->totalShipping; // order items $items = $order->items; foreach($items as $item) { $item->title; $item->price; $item->totalPrice; $item->fulfilmentStatus; } // explode $data = $order->items->explode(array('title','price','tax')); $json = json_encode($data); As you can see, you can cherry-pick what you want to send to other services. Also note that each item within an order has its own fulfilment status. This is helpful in tracking each items status. I will give an update after I finish with this post, specifically about discounts. You will still be able to hook into prices if you wish but we have 4 types of discounts in-built that cover most scenarios. Yes :-). Our shipping classes and modules are all ready. I only need to implement the backend GUI. Briefly though, shipping is made up of these: Shipping Zone: Geographical, from post/zip code all the way up to continent. Shipping Rates: Light goods, heavy, 10 items, $30 order, flat, etc. Shipping Methods: Normal, Super Fast, Slow, Next Day, etc. Shipping Option: A combination of Shipping Rate and Shipping Method: e.g. Your order falls under the shipping rate 'Heavy Goods'. If you want them fast, you pay $40. If are in no hurry, you pay $10.,etc Using the GUI, you will create your shipping zones. Each zone can have its own rates, methods and options. I have spoken about shipping zone before. Please see this post. Yes, but not now. Probably after the release of Padloper 2. We have two existing Payment Modules that we can work with, although they too will be polished a bit (given the various suggestions we've seen in the forums). Definitely :-). In your example, Licence 1 and 2 are just variant options themselves. See the demo below. I am planning to hire a number of octopuses so we can type faster ?. Seriously though, I am working as hard as I can. Maybe after the summer. Please see the first post in this thread, under Pricing Model. Thanks all!
-
Oh, oh. Someone forgot to set limits to upload sizes and/or client-side image resizing ??. Good question. I'm not sure whether the code below will work. I don't know whether such images are counted by ProcessWire as uploaded or it is just their resizing that is an issue. I don't have a test image to use but try the below please in a Tracy console and let me know. It is just checking for empties. If it doesn't work maybe we can search by image size (0x260) instead. $empties = $pages->find("template=media-manager-image,media_manager_image.count=0"); d($empties,'EMPTIES');
-
.....And @LostKobrakai the "stingiest" among the so-called top posters ??.
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
kongondo replied to kongondo's topic in Modules/Plugins
Btw, mainly for @bernhard and @adrian who have previously looked at RTM code, InputfieldRuntimeMarkup now behaves similar to many inputfields in that it gets its values from the Fieldtype's wakeupValue(), i.e. from $this->attr('value'). The previous implementation seemed a bit unclean to me when I looked at it recently. We had the inputfield doing its own eval() or wireRenderFile(). Now I've moved everything to FieldtypeRuntimeMarkup plus added a small helper class in there to handle such things. All the inputfield does now is serve values, as inputfields are meant to do. -
Update: Blog 2.4.3 Changelog Added method to find embedded images for use as featured image(s), for example. Thanks @Karinne Cyphers How to use the method findEmbeddedImages($markup, $limit=1). $blog = $modules->get("MarkupBlog"); $posts = $pages->find("template=blog-post,sort=-blog_date,limit=10"); foreach($posts as $post) { // get only one embedded image // $embeddedImages = $blog->findEmbeddedImages($post->blog_body); // get 5 embedded images $embeddedImages = $blog->findEmbeddedImages($post->blog_body,5); // if embedded images found if(count($embeddedImages)) { // do something with $embeddedImages array // simple array where each value is a URL to the embedded image } } As you can see, the $markup is not limited to blog_body. Module has been updated in the modules directory.
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
kongondo replied to kongondo's topic in Modules/Plugins
Update version 006 - 11 May 2019 Finally got a bit of time to work on this module. Changelog Namespacing: ProcessWire 3.x Support only from now on. Removed the module's CSS and JS files. They are unnecessary. Switched to $files->render() instead of wireRenderFile(). Option to check for and optionally use InputfieldAceExtended for code highlighting in the PHP custom code textarea. Thanks to @adrian , @diogo and others who suggested this. Option to specify number of rows for the PHP custom code textarea (@note: for some reason, it's not working with Ace Extended. It does work with plain textarea). Removed the option (in field settings) to search for files to render under /site/modules/FieldTypeRuntimeMarkup/ as these could get overwritten during upgrades. Refactored code to prevent unnecessary re-rendering of output, thanks @adrian Render PHP file mode is now supported for frontend use as well, thanks @Noel Boss Changed license to MIT. Please note this is the new master and is available in the modules directory. Screenshots Over to you @bernhard ?. -
Media Manager version 012 (released 10/05/2019) Happy to announce the latest release of Media Manager. Changelog ProcessWire 3.x support only. New GUI to match AdminThemeUiKit Upload Anywhere (drag and drop to upload in Media Manager Library and Media Manager Inputfields). Custom fields/columns - add any field to any of the Media Manager templates and access them as a property of a MediaManager object. Edit a single media including its custom fields I would like to thank all the beta testers! Documentation Documentation is now complete! Please report any missing links or anything that is not clear. Upgrading Grab the latest version of JqueryFileUpload (version 008) from here. Upgrade to that version (note: it is also namespaced) Grab the latest version of Media Manager using resend download links form here. Simply overwrite existing files but delete the files MediaManagerTabs.php and pocketgrid.css in the old files. Hit module refresh. You might need to clear compiled files several times. For most beta testers, upgrading has gone smoothly. However, two people have reported an error about class ProcessMediaManager not found in line 20 of MediaManagerUtilities. I have not been able to resolve this issue. I suspect FileCompiler is trying to be clever or some module loading order change? Please let me know how it goes. Beta testers, please upgrade as well. A few things have changed including a fix for the bug reported in the previous post. Screenshots Please refer to the documentation for more photos. Thanks!
-
Excellent find! You've saved me some debugging headache, thanks :-). A user reported missing images in grid view (table view was fine) and I couldn't figure out what was going on (I didn't have access to that site) but it was also a German user :-). Fixed in the release version (012). Please see post below.