-
Posts
2,780 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Macrura
-
I need to make a quick and easy way to access the edit page for page selects, usually with AsmSelect; so far i have been able to use this jquery to turn the label for the AsmSelect into a link to the page editor for that selected page, but i can't figure any easy way to make it into a modal.. anyone else tried to do this yet? $(function(){ $('div.InputfieldPageAutocomplete ol li').each(function(){ var id = $(this).find('span.itemValue').text(); $(this).find('span.itemLabel').wrapInner(" <a class='edit-modal' href='"+config.urls.admin+"page/edit/?id="+id+"' target='_blank'></a>"); }); }); adding this with the AdminCustomFiles assigned to process page edit..
-
Here's an example of how I used the module that netcarver posted: before something is selected: after selection: i also had an idea for extending AsmSelect to make the selected items clickable and brings up a modal editor for that selected page; has anyone done something like that yet? For example with this site I'm working on, you can add composers to a track, but it would be cool if after you add new items to the page you could click on them to make some edits (bio, website for ex), without having to go and find that page in the tree..
-
@netcarver - can't thank you enough -this completely works!! I added a js file to populate my description field above the select, and changed the module name to be select, not multiple.. will have to do a screenshot/screencast; this module should be made available in some form on the directory, as i think it has some great use cases for data- attributes on selects... maybe both versions, select and select multiple
-
w.o.w. ! netcarver - thanks -this is going to be amazing, and i don't think i could have figured this out, at least not for a while.. so (this being the first time i'm doing this more advanced sort of module), could you possibly explain a tiny bit more about how to extend the class (say for InputfieldSelect) - where or what sort of module would i create to place that code? TIA
-
I'm trying to create a slightly enhanced page select, whereby the only difference to the output would be adding a data-description to each option, which would be populated by looking up the value of a data-description field on that selectable page; I know where (renderOptions function) to make the change, but not sure how to hook in there and replace that function, or should i make a new inputfield for this? I did try copying the InputfieldSelect and making some changes (calling it InputfieldSelectEnhanced), and but i'm not clear how to get this new inputfield to show up in the list of options for the Fieldtype Page... ultimately the goal would be to use javascript to replace the description area below the page select with the data for that particular select; for a simple example, say I have a select on a page that specifies actions that will take place on save (like importing files, or deleting files from the page etc..), i would like to have a more descriptive paragraph about what exactly my save action will do.. this would be sort of useful just about anytime you needed to show the user more information about what they have selected, beyond just the title, and where that info is going to be a little verbose (and wouldn't work as the option label).. thanks!
-
I'm wondering about the page tables and how it closes when you hit save - i think it would be better if this behavior was configurable, because some of my templates run actions on save, so i sometimes need to save a page a few times when editing.. but then the modal window closes every time i hit save, so i basically end up going over to the child pages tab and editing directly on the page to avoid editing in the modal with the close issue...
-
I'm pretty sure you could write a module that would do this, and would dynamically set the name and title according to the template and your rules... so you wouldn't use the auto page name feature, but would write your own, sort of like this: https://processwire.com/talk/topic/1648-ok-to-change-page-name-path-after-save/?p=15232
-
Wondering if anyone has had any luck configuring templates for ckeditor?... the plugin is included with the default package, and enabling it was easy enough, but setting the config to recognize the path to the custom templates is not working... i could edit the default in the wire/ckeditor. but somehow there must be a way for the system to allow for the setting of the custom templates js file i tried adding this to my additional config options templates_files:/site/templates/js/mytemplates.js but am getting js errors of all sorts.. and the template popup is blank also tried adding this to the config.js in /site/modules/InputfieldCKEditor CKEDITOR.editorConfig = function( config ) { config.templates_files = [ '/site/templates/assets/js/mytemplates.js' ]; }; but that didn't work either... Edit: Decided to go a different route, and simply create a module that will append stuff to the current page body, based on a page select field; this way I can create my templates (which i call boilerplates) in processwire and then insert those boilerplates right into the editor and make modifications from there... using it for text mostly but could be use for almost any content you might need to reuse in an RTE... here's the gist.. https://gist.github.com/outflux3/cf5807ddedfaa5c0d425#file-gistfile1-php if anyone is interested and looks at it, let me know if you see any issues or potential problems; this will always append the body fields of the selected pages to the current page body field and then remove those from the page select field... working well in some initial tests
-
actually looks like fontawesome has word, audio and video
-
@Blad - great module! - wondering how hard it would be to make the icon classes and file extensions into a configurable table, so you could add stuff like mp3 audio icons, video files, and even have different icons for doc, or txt, etc..
-
cool - this totally worked... I see the Soma wisdom.. a light has turned on! ( this is in the custom php code to find selectable pages..) $album = $pages->get("template=album, album_tracks_pt=$page"); return $album->album_tracks_pt->find("track_group=2194"); i guess the thing that i wasn't getting is the selector for looking in an array; in the api usage i'm always using has($page), but in selectors it seems the = sign does the same thing, interpreted as 'has' for pagearrays
-
@soma - thanks for helping out.. so how would I find the album the track is on in a single selector, that could be used for returning the list of tracks for that album, that have that particular attribute (track_group=2194)
-
For the most part i think i could get away without assigning the page-table pages (tracks) redundantly, except in this one situation: i need to populate a page select on this 'track' template, that only looks for other tracks on the same album with the field track_group=2194 (which indicates the start of a track group); return $pages->find("template=track, track_group=2194,album_select={$page->album_select}"); if i could figure out a selector to replace this one which relies on that redundant 'album_select' field, then i could drop the whole reference thing, and use the api for any other output-related stuff.. if the tracks (page-table pages) were children then i could do this: return $pages->find("template=track, track_group=2194,parent={$page->parent}"); if they were repeaters, not sure how to do that would maybe have to use getForPage() though I don't know if there is a selector for that?
-
@adrian - thanks for commenting on this!... What about in the case where page table fields live under some other single parent, not as children of the page? I guess i still need the custom module for this... For example, now i'm doing a record label site and we have albums as pages and then each track is a page table page on the album. This lets us have a nice formatted track list (page table) in the editor, and the the track (page) itself can hold all sorts of data, like preview, full track stream, duration, track index, grouping, composers, performers etc.. but i do want to hide the tracks–i don't want to confuse the users, to see all of those tracks open up if a user clicks the album title; some of these albums have 40 tracks.. so i decided to store the tracks under a hidden tracks parent page.. So the tracks themselves need a page reference to the album they are from, and this is what the module is supposed to do.. If there were some way to set the visibility of the pagetable pages so that users would not be able to directly interact with them, but still be children of the page, that would actually be the ideal way..
-
After upgrading a site to 2.5, i can no longer access the admin modules page, i get redirected to a 404 page. I'm not really sure how to fix this, and wondering if anyone has some tips or ideas where to start... one idea i had was to export the whole site with the site profile export and then install on a clean 2.5, hoping that would sort out whatever snafu has occurred.. Edit: was being caused by the page edit per role module...
-
Use shopping cart with existing Processwire website (prestashop)
Macrura replied to bearclaw's topic in Getting Started
foxycart allows you to use your own cart and then use their checkout page; you do it by adding all of the products in your 'pre cart' to the foxycart cart and redirect to checkout; so this would imply that you use the shop-for-processwire and on the cart page and then modify it to be a form that submits to FC when clicking the checkout button; or you can just use the default foxycart; for prestashop, you might run your prestashop in a subdomain like shop.domain.com and then have links to the product pages from processwire; it's awkward to do it this way nowadays, but you still see it, where companies have their main site, and then a dedicated shop site. Seems like overkill though for what you're setting up.. snipcart also looks really cool and is ahead of FC with respect to responsive design- 9 replies
-
- E-commerce
- commerce
- (and 4 more)
-
since those are file fields, i would recommend to use the built in tags function of the file field, and then tag each file with the language code; then you can get the correct file with a findTag.. or getTag
-
@dazzyweb - yes, that module would work, and then if you modify it with the code a few posts up, it should do what you want!
-
Yes
-
@dazzyweb - the module i wrote for this does exactly what you are describing... do you need additional info on how to set that up?
-
you could also make a module that would automatically add the child pages to the parent's page table if they are created from the page tree, hooking into saveReady on the child page's template... $page = $event->arguments[0]; if($page->parent->my_page_table->has($page)) return; $page->parent->setOutputFormatting(false); $page->parent->my_page_table->add($page); $page->parent->save();
-
Hi Matthew - thanks - i do take your opinion very seriously and have followed your thread about the outage(s). So right now i'm on Servint, and the site seems to be running well; haven't had any major issues yet, and the support has been responsive. This is my first time ever using anything other than reseller shared hosting, and the performance of the server has been very good, and the scripts i need to run on there have been really running well... As it was quite a bit of work to migrate the client's cpanel account over to Servint from the previous shared host, i have my fingers crossed that I won't need to move again.. but I will post back here some further updates and ratings for this server, specifically the performance and uptime. This one is in the DC datacenter.
-
hey peter - sure, here are the 2 sites running foxy: http://ohmspeaker.com http://www.katonahartcenter.com
-
@joey - do you mean coupons, or what kind of discounts do you mean? I've been able to setup easily all kinds of discounts using the attributes in the add to cart code, modified either server side, or with js, depending on what dictates the discount... @jlahijani - i'm looking at snipcart now for a project... but since i'm already used to foxycart, not sure if i can get my head around a new system fast enough for this upcoming launch... One thing to also consider is that Foxycart can accept multiple items added into the cart at one time, as well as being able to redirect to the cart/checkout without using the popup. So this opens up the possibility to simply use the processwire shop, and then switch out the final checkout button to send the contents of the PW cart to the foxycart for checkout; this would be good in many ways since you would have the SSL, PCI, huge range of supported payment processors, and all the other features of FC, and be able to use all of the shop-for-processwire features as your "pre-checkout/cart"
-
@Pwired - i think also it depends on the market sector - Prestashop has a better-than-decent system for matrix products built in (meaning generating product variations based on attributes and inventory tracking, SKUs, images, as well as swatches for color, and selects for users on the front office), as well as some other features like returns, customer account management, re-ordering with 1 click... This is the main reason we're going with PS now; also there are just enough 3rd party modules that cover some difficult needs, such as complex delivery scheduling, social logins, tell a friend, loyalty rewards program, quickbooks integration, email marketing integration etc..