Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/15/2019 in all areas

  1. SnipWire - Snipcart integration for ProcessWire Snipcart is a powerful 3rd party, developer-first HTML/JavaScript shopping cart platform. SnipWire is the missing link between Snipcart and the content management framework ProcessWire. With SnipWire, you can quickly turn any ProcessWire site into a Snipcart online shop. The SnipWire plugin helps you to get your store up and running in no time. Detailed knowledge of the Snipcart system is not required. SnipWire is free and open source licensed under Mozilla Public License 2.0! A lot of work and effort has gone into development. It would be nice if you could donate an amount to support further development: Status update links (inside this thread) for SnipWire development 2020-07-03 -- SnipWire 0.8.7 (beta) released! Fixes some small bugs and adds an indicator for TEST mode 2020-04-06 -- SnipWire 0.8.6 (beta) released! Adds support for Snipcart subscriptions and also fixes some problems 2020-03-21 -- SnipWire 0.8.5 (beta) released! Improves SnipWires webhooks interface and provides some other fixes and additions 2020-03-03 -- SnipWire 0.8.4 (beta) released! Improves compatibility for Windows based Systems. 2020-03-01 -- SnipWire 0.8.3 (beta) released! The installation and uninstallation process has been heavily revised. 2020-02-08 -- SnipWire 0.8.2 (beta) released! Added a feature to change the cart and catalogue currency by GET, POST or SESSION param 2020-02-03 -- SnipWire 0.8.1 (beta) released! All custom classes moved into their own namespaces. 2020-02-01 -- SnipWire is now available via ProcessWire's module directory! 2020-01-30 -- SnipWire 0.8.0 (beta) first public release! (module just submitted to the PW modules directory) 2020-01-28 -- added Custom Order Fields feature (first SnipWire release version is near!) 2020-01-21 -- Snipcart v3 - when will the new cart system be implemented? 2020-01-19 -- integrated taxes provider finished (+ very flexible shipping taxes handling) 2020-01-14 -- new date range picker, discount editor, order notifiactions, order statuses, and more ... 2019-11-15 -- orders filter, order details, download + resend invoices, refunds 2019-10-18 -- list filters, REST API improvements, new docs platform, and more ... 2019-08-08 -- dashboard interface, currency selector, managing Orders, Customers and Products, Added a WireTabs, refinded caching behavior 2019-06-15 -- taxes provider, shop templates update, multiCURL implementation, and more ... 2019-06-02 -- FieldtypeSnipWireTaxSelector 2019-05-25 -- SnipWire will be free and open source Plugin Key Features Fast and simple store setup Full integration of the Snipcart dashboard into the ProcessWire backend (no need to leave the ProcessWire admin area) Browse and manage orders, customers, discounts, abandoned carts, and more Multi currency support Custom order and cart fields Process refunds and send customer notifications from within the ProcessWire backend Process Abandoned Carts + sending messages to customers from within the ProcessWire backend Complete Snipcart webhooks integration (all events are hookable via ProcessWire hooks) Integrated taxes provider (which is more flexible then Snipcart own provider) Useful Links SnipWire in PW modules directory SnipWire Docs (please note that the documentation is a work in progress) SnipWire @GitHub (feature requests and suggestions for improvement are welcome - I also accept pull requests) Snipcart Website ---- INITIAL POST FROM 2019-05-25 ----
    14 points
  2. Sorry mate, missed this one. It is error 9. 2019-05-15 19:00:26: Unable to re-open ZIP (/home/xxxxxx-nl/webapps/xxxxxx-nl/public/site/assets/backups/2019-05-15_19-00-24-xxxxxx.nl.package2.zip): 9 When I disable that code block I get: 2019-05-15 19:04:00: - package build failed. 2019-05-15 19:04:00: - an error occured during package build. 2019-05-15 19:04:00: - an error occured while building the ProcessWire structure: /home/xxxxxx-nl/webapps/xxxxxx-nl/public/site/assets/backups/2019-05-15_19-03-56-xxxxxx.nl.package2.zip root: /home/xxxxxx-nl/webapps/xxxxxx-nl/public/ Array ( [filename] => 2019-05-15_19-03-56-xxxxxx.nl.package2.zip [folder] => /home/xxxxxx-nl/webapps/xxxxxx-nl/public/site/assets/backups/ [exclude] => Array ( [0] => /site/assets/cache/WireTempDir [1] => /site/assets/backups [2] => /site/assets/cache [3] => /site/assets/sessions [4] => %\.\d+x\d+\.[^/]+$% [5] => ) [extension] => Array ( ) [allowHidden] => 1 ) 2019-05-15 19:03:56: - package build failed. 2019-05-15 19:03:56: - an error occured during package build. 2019-05-15 19:03:56: - an error occured while building the ProcessWire structure: /home/xxxxxx-nl/webapps/xxxxxx-nl/public/site/assets/backups/2019-05-15_19-03-52-xxxxxx.nl.package2.zip root: /home/xxxxxx-nl/webapps/xxxxxx-nl/public/ Array ( [filename] => 2019-05-15_19-03-52-xxxxxx.nl.package2.zip [folder] => /home/xxxxxx-nl/webapps/xxxxxx-nl/public/site/assets/backups/ [exclude] => Array ( [0] => /site/assets/cache/WireTempDir [1] => /site/assets/backups [2] => /site/assets/cache [3] => /site/assets/sessions [4] => %\.\d+x\d+\.[^/]+$% [5] => ) [extension] => Array ( ) [allowHidden] => 1 ) Thanks again! I currently use 1.3.11.
    2 points
  3. Just pushed an update - v1.3.12-ATO - the quantity of megabytes saved before an archive flush is now configurable. When the value is empty or equal to 0 then the option is disabled. @Autofahrn what is this check ? I don't have it in my code ?
    2 points
  4. When output formatting is off the value of a Images field is a Pageimages object (WireArray). So you have to do: $page->pageBanner->first()->focus(10,10);
    2 points
  5. Well, I guess your site contains a lot of data so the re-opening still is triggered. I'm really interested in the returned error number, did you try to add the suggested code change? Otherwise you may simply disable the whole block in duplicator.module: if(false && ($fragmentBytes >= self::DUP_ZIP_FLUSH_MBYTES*1024*1024)) { $zipLog->verbose("CLOSING ZIP: {$zipfile}"); $zip->close(); $zipLog->verbose("OPENING ZIP: {$zipfile}"); // if($zip->open($zipfile) !== true) throw new WireException("Unable to re-open ZIP: $zipfile"); $res = $zip->open($zipfile); if($res !== true) throw new WireException("Unable to re-open ZIP ({$zipfile}): {$res}"); $zipLog->verbose("OPENED ZIP: {$zipfile}"); $fragmentBytes = 0; set_time_limit(300); } @flydev, maybe we should have DUP_ZIP_FLUSH_MBYTES configurable with that option disabled when not set.
    2 points
  6. yes, that's the case with me. i have now installed the last update and everything works fine. existing backups now appear in the overview. thank you
    2 points
  7. You are safe to store a regular array in the session variable. See this old thread: I would worry to much about performance since only looking up ID's is very fast since you are not joining.
    2 points
  8. Another solution is to use Analytics and use their API and present the data to your client in Process Module.
    2 points
  9. You might find this module useful for that: https://modules.processwire.com/modules/restrict-repeater-matrix/
    2 points
  10. I've updated to the latest dev and unfortunately it is not working. 2019-05-14 20:39:11: - package build failed. 2019-05-14 20:39:11: Unable to re-open ZIP: /home/xxxxxx-nl/webapps/xxxxxx-nl/public/site/assets/backups/2019-05-14_20-39-09-xxxxxx.nl.package2.zip I tried upping DUP_ZIP_FLUSH_MBYTES and played with other settings, but no luck. I'm unsure why. For now I'll keep running the previous version. Thanks for the hard work on this module.
    2 points
  11. Hello for all, ConfigurationForm fieldtype module is one my experiment from 2016. Main target to build this module was to store multiple setup and configuration values in just 1 field and avoid to use 1 db table to store just single "number of items on page", or another db table to store "layout type" etc. Thanks to JSON formatted storage this module can help you to reduce number of PW native fields in project, save DB space, and reduce number of queries at front-end. Install and setup: Download (at the bottom ), unzip and install like any other PW module (site/modules/...). Create some filed using this type of field (ConfigurationForm Fieldtype) Go to field setup Input tab and drag some subfields to container area (demo). Set "Name" and other params for subfields Save and place field to templates ("Action tab") How to use it: In my case, I use it to store setup and configurations values, but also for contact details, small content blocks... (eg. "widgets"). Basic usage example: ConfigForm fieldtype "setup" has subfields: "limit", type select, option values: 5, 10, 15, 20 "sort", type select, option values: "-date", "date", "-sort", "sort" // get page children (items) $limit = isset($page->setup->limit) ? $page->setup->limit : 10; $sort = isset($page->setup->sort) ? $page->setup->sort : '-sort'; $items = $page->children("limit=$limit, sort=$sort"); Screenshots: Notes: Provide option to search inside subfields Provide multilanguage inputs for text and textarea field types Provide option for different field layout per-template basis Do not place/use field type "Button" or "File input" because it won't works. Please read README file for more details and examples Module use JSON format to store values. Text and textarea field types are multilanguage compatible, but please note that main target for this module was to store setup values and small content blocks and save DB space. Search part inside JSON is still a relatively new in MySQL (>=5.77) and that's on you how and for what to use this module. Thanks: Initial point for this fieldtype was jQuery plugin FormBuiled and thanks to Kevin Chappel for this plugin. In field type "link" I use javascript part from @marcostoll module and thanks to him for that part. Download: FieldtypeConfigForm.zip Edit: 14. August 2018. please delete/uninstall previously downloaded zip Regards.
    1 point
  12. the if(false is my php replacement for #if 0 ?
    1 point
  13. ok, "no such file". No surprise, that re-opening and the package build fail. So I wonder why creation of the zip does not already throw an exception. Do you see that file on your server?
    1 point
  14. @ryan Don't know if you have noticed it: The developer map is broken (lots of JS errors). Did that break after the redesign?
    1 point
  15. Hi Robin S Thanks a lot for your reply. I tried the example in your linked post and it works: $field = $user->language->isDefault() ? "body" : "body.data" . $user->language; But in case of Repeaters it seems not to work. The following code throws an Error Exception: Multi-dot 'a.b.c' type selectors may not be used with OR '|' fields. $field = $user->language->isDefault() ? "repeater_element.body" : "repeater_element.body.data" . $user->language; I tried with sub-selectors, but couldn't get it to work fo far:
    1 point
  16. For any kind of non-php based storage (a.k.a. any long lived one) you need to serialize the data somehow. The simplest and most dangerous is php's serialize, json is an option or implementing a custom fieldtype, which is probably the most work depending on what you're actually storing in the wirearray. Afaik it handles PageArrays by only storing the page ids and recreating the PageArray on load.
    1 point
  17. You could create a Page Reference field that has the Repeater items as selectable pages. Hook for selectable items in /site/ready.php: $wire->addHookAfter('InputfieldPage::getSelectablePages', function(HookEvent $event) { $page = $event->arguments(0); if($event->object->hasField == 'select_repeater_item') { $event->return = $page->repeater; } }); Then create a matrix type that has this Page Reference field. But if the repeater items are to be output among the matrix items then I'm not sure why the repeater exists as a separate field. Wouldn't it be better to just have a matrix field alone and replace the repeater with a matrix type?
    1 point
  18. Done. pushed the update in Duplicator 1.3.11-ATO. Does your domain name contain a dash char ? If yes, try the latest update (v1.3.11-ATO).
    1 point
  19. Try: $result = new PageArray(); foreach($pages->getById([1049,1053,1055,1059,1152]) as $p) { $result->add($p->repeater_field->findRandom(3)); } $result->shuffle(); // Now do something with $result - foreach, etc.
    1 point
  20. I got your idea wrong. Let me see.... $randomPages = $pages->find("your selector here")->shuffle(); foreach($randomPages as $randomPage): foreach($randomPage->repeater_field->findRandom(3) as $item) : Output endforeach; endforeach; Use findRandom() instead of getRandom().
    1 point
  21. Or change it in the database - via the link to Adminer in the RequestInfo panel in Tracy is a nice shortcut, but however you get there is fine.
    1 point
  22. This is off-topic, but here is drag and drop JSON tree page module (or menu manager) what I build inside this project to solve client task to get much as simple solution to manipulate with Main menu (and all other website navigations). Also, please that this topic go in same direction as it started. This is only short of-topic. What this module do: 1: clone page tree and build JSON string (it's good if you have few thousands of pages), and in rendering you don't have in runtime to build main menu 2: if you have some special cases where need to do some correction for main menu, you can do it very fast and easy (do not need to "move" DB large page tree, you "moves" inside small JSON) 3: you can save ("export") somewhere current tree, and experimenting with menu 4: you can create page tree Menu, and child "Top menu", "Sidebars", "Fotter menu" etc... I build this for this project, and main target was to leave real PW page tree, but add options to manipulate with that if needed. Also one of target was to get faster page rendering, done testing (in this project with >2000 pages, get faster pages rendering about 25% and more). How to use it: 1) download attached zip (at the bottom of this message) and install like any other PW module 2) create "JSON tree" type field and place it on some template ("menu", or if you like place it on "home", or...) 3) you can add pages one by one (first tab), or if you have large page tree, in second tab set your "max deep level", set what parent you want to skip their children, and press "Create list" 4) press Save 5) now you can drag and drop and create custom tree (and after changes press save) How to edit some list item: Press on some list item button "pencil/edit", and in the bottom you will get that page selected, change that to some another page... And press Save. How to create "Label" item, in next version that would be different, but now it's can be done: 1) Create template "label" (only title field), create some pages ("labels"), and after select that pages inside JSON tree and append children to it (drag and drop). 2) In rendering process check if template=='label'... How to render page tree (Menu): As example, call: // field is on page with id 3600 // fieldname is "tree" $menu = $pages->get(3600); // var_dump($menu->tree); echo mainMenu( json_decode( $menu->tree)); // mainMenu is method in function.php, there you go through tree and create UL,LI... NOTES: 1) What is inside "mainMenu" function? Do var_dump(...) before function call and will understand what that function need to do. We have JSON objects with attributes, eg. "pwid" store page ID. If you don't build multilanguage websites, you don't have to call PW page (there is also attribute "slug"). // function.php // you need to create function inside function.php // this is only example function mainMenu($items){ $out = ''; foreach( $items as $item ){ // please note main attribute "pwid" it's store PW page id $i = wire('pages')->getById($item->pwid)->first();// in my example need this because multilanguage project . . . . } } This module is totally unpolished (first version). Here are few screenshots: - First image shows process when module clone PW page tree where you can add desired pages to list. - Second image shows option where you can add pages one by one, or select multiple and add. - Third image shows what happened after you press button "Add to list" or "Create list". Regards. FieldtypeJSONtree.zip
    1 point
  23. Hi Piqsel and welcome! This should get you what you want: $out .="<span>".$product->fields->product_price->label.": </span><span>" . number_format($product->product_price, 0, ' ', ' ') . "</span>"; Hope that helps, and feel free to keep asking away
    1 point
×
×
  • Create New...