-
Posts
2,776 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
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..
-
@jlahijani - awesome post - and that's my go-to setup (PW+FC+OD)... it's such a reliable, hassle-free, robust, simple setup - and i have 1 site that is PW+FC for over a year now and never had any issues; 2nd site with this is 8 months out, huge number of transactions per day, and whole things works flawlessly; I will look at your other suggestions, Spree and Sylius! it's all such a puzzle, this ecommerce situation...
-
Integrity Constraint Violation When Adding Child Page [Solved]
Macrura replied to Macrura's topic in General Support
more facepalm.. my own module was naming the next page with the count of all child pages +1... just remembered this! have added unix date string to the end of the auto-naming for the child pages which should solve the unique-ness issue... -
we have a site with a parent page called "sessions" and child pages that hold information about class sessions for a school. there are 491 sessions there now and when a user tries to add a new session, the 492nd one is failing with the following error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '492-1664' for key 'name_parent_id' we can delete some child pages, add some, and as long as we don't get up to the 492nd one, we're ok, but we can't get past that 492nd child page... the child pages are being managed by the new pro-fields pagetable; it has all been working fine until today; not sure if this has anything to do with pagetables; users can add pages directly, or from the page that handles the pagetable; this is accomplished with a page select on the child page and a module that adds the child page to the page table field after that page select is populated... but adding child pages either way from the parent page on the pagetable, or directly adding a page in the tree, it always is failing on the 492.. ___ OOPS... this has been solved - had to look through the database and sure enough there was a page with the name 492, and when creating a new page the system was trying to temp name the new page to 492... long story short, i need to set some required fields and add more checking and validation to the page names..
-
@adrian - many thanks; i have the migrator installed on a localhost and that's where i generated the export; then i tried to import to a site running on a private intranet... right now my main thing is to try and first fix the users list.. i might try installing my backup and see if users works, in which case it would be likely that the cause of the current issue is something to do with the migrator... but i should have time next week to help out and do some testing... right now i'm lack of sleep and too many projects, too many deadlines!