-
Posts
1,303 -
Joined
-
Last visited
-
Days Won
16
Everything posted by elabx
-
Thanks for the reply @Mike Rockett! In a completely different scneario, I am trying this as source: [propiedades]/detalle_propiedad/1363/some-segment[/][?b=1] (As destination it's a plain url) So that it would match: detalle_propiedad/1363/casa-en-preventa-colonia-maya?b=1 detalle_propiedad/1363/casa-en-preventa-colonia-maya/?b=1 propiedades/detalle_propiedad/1363/casa-en-preventa-colonia-maya/?b=1 Does anyone know if I am correct in this assumption? EDIT: Solved it with two jumplinks like this: {segments}/{num:num}/{segment}/?b=1 {segments}/{num:num}/{segment}?b=1 I also think there might be something the community could do to help? Funding? "Crowdfunding"? Though maybe Mike's slammed with client work or sth and that's it haha
-
Well who knows! The devil is in the detail. And I do agree the javascript events would be a powerful enough reason. I also remember reading that conversation a while ago and do agree on your points. Particularly the "auto include" of files, pretty much like the modules.
-
So do you plan on using the frontend Shopify javascript libraries to display the products/enable cart? Or how do you plan to integrate that? I know I'm a bit out off topic haha but maybe it's something we can help you with, too.
-
Heres a VERY rough script and it's very messy. (ran it from command line also) https://gist.github.com/elabx/ba4879fe36ca9430f8d614aaee52fc5a Specifically, check the functions addProduct() and updateProductVariant(), in those two functions is where I call the Shopify client, and all the setup starts here on line 175. This script is meant to grab data from a CSV, by if you look at addProduct you can basically tell how to add a product through the API so instead passing an array to that function you could pass a Page object for example and fill in the gaps. On shopify you would just need to setup a Private application, to get the required key/secret. BEWARE to run the script as is, because it deletes all products on the Shopify store every time the script runs.
-
I have done this (product migration from A to Shopify) and it is fairly simple using Shopify's API and a Shopify private app. I have used this library . Probably what is more time consuming is understanding Shopify's API endpoints. (e.g. took me some time to understand all shopify product objects actually have at least one variant object, where the actual price is kept!) My doubt is, do you plan to completely deprecate the PW website? Or do you plan to embed Shopify somehow into the existing site?
-
I'm curious, how would your module be different from FieldtypeRuntimeMarkup?
-
Didn't work unfortunately ?
-
Hi everyone! Does anyone know if it's possible to map a source url taking into account optional string at the end? For example: Source -> Destination example.com/es/this-is-a-nice-url -> example.com/es/this-is-a-nice-url example.com/es/this-is-a-nice-url-1 -> example.com/posts/this-is-a-nice-url example.com/es/this-is-a-nice-url-2 -> example.com/posts/this-is-a-nice-url Making the "-1" or "-2" optional.
-
Advocating for option 1, if you have phpMyAdmin on both servers you could rather do a simple SQL export/import, then you skip all of what you mention about exporting fields, templates, etc. (I guess create the database/db user first from whatever management panel you are using) Also, instead of installing through softaculous, you could just zip, upload an unzip the whole ProcessWire website inside the web root of the new server (public_html folder in some servers, for example). If you reconnect the db with the new database data in config.php, it should just work. And last but not least, change $config->httpHosts array in config.php to accept the new domain. Also I guess Duplicator should work, would try with it first if you don't feel very confident in the above steps.
-
I think the Page::viewable hook might help you here: <?php wire()->addHookAfter('Page::viewable', function($event) { if(!$event->return) return; // already determined user has no access if(wire('user')->isSuperuser()) return; // superuser always allowed $page = $event->object; if($page->users_created_id != $this->user){ //Don't let user view page $event->return = false; } });
-
Interesting app to design emails: https://imperavi.com/revolvapp/
-
Had forgotten about it also!! Hope you are up to this version of PW: https://processwire.com/blog/posts/pw-3.0.111/ Maybe this would work? //In the context of the hook $p->name = $this->pages->names->uniquePageName($this->sanitizer->pageName($p->title));
-
Try this: $page = $pages->get('name=page-to-move'); $page->of(false); $page->parent = $pages->get('name=new-parent'); $page->save();
-
Fields can be configured to have access level per role. If you edit the redirect field, go into the Access tab and enable access control, you can enable the fields you need for certain roles.
-
I've uses LastPass a couple years. Love having the chrome extension at hand to get any pass. Autofill might not always work great tho.
-
From what I understand, repeater order is actually just the page order within the tree branch, so you might want to dive a bit into the tree to see if you can move stuff around and reflects itself in the repeater.
-
It's jQuery UI! And the sidepanel is just an animated div, nothing fancy really.
-
[SOLVED] Relative time multilanguage in page Lister
elabx replied to elabx's topic in Multi-Language Support
Interesting read, thanks! Great to know it's hookable. I was also gladly susprised that there was a way to specify the order of the words in the relative time output, that sealed the deal! -
What I've done in this scenarios is adding a new method through a hook to pages, something like $page->customUrl() that checks conditions before outputting the url.
-
Maybe with prevAll() ? https://processwire.com/api/ref/page/prev-all/ $prev = $page->prevAll(); //Asuming it returns sorted in the same order (I'm not certain) get the last 10 pages $prev = $prev->slice($prev->count - 10);
-
Is it possible to get output on another language the relative dates on lister fields (like modifed, creation date)?
-
Call to undefined function when using wireRenderFile via AJAX request
elabx replied to a-ok's topic in General Support
Where is getRatio() getting called? I think we would need more context of your includes to help you. -
Maybe this module is what you might be looking for: https://modules.processwire.com/modules/helper-field-links/
-
Hi! Does anyone know if the dependency support is still limited in repeaters? Tryin to use them within a repeater matrix like: page_field.count>1
-
For what I can tell the tables use jquery table sorter for this task. Maybe you can check in their documentation how to restart the plugin with the format you require. Found this also, specific to date formats.