Jump to content

apeisa

Moderators
  • Posts

    4,632
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by apeisa

  1. You are right about this. Cart view and updating the cart definitely belongs to Cart class. I think I have transferred since I have badly named it in the first place ("renderCheckout"). It should be "renderCart" or "renderFullCart". I will do this change soon. Thanks for the code snippets. Your shop looks very good! The Ajax thing has been implemented pretty much the same than what I have been thinking. Of course we would leave that front end implementation for end user or maybe offer that as configurable option at some point. Hopefully I find time tonight to take this further. I haven't got any work done today, since everyone else are in fever at our house.
  2. Made some progress today with eCommerce stuff. I simplified a lot of code, re-factored it to have fully independent Shopping Cart module and then two heavily tied modules ShopOrders and ShopCheckout. Not sure if that is best way to go, but it is much cleaner than the old stuff. I have kept the post logic there, so that you don't have to code your own if you don't want to (of course it is pretty easy to do if you want). I plan to provide Ajax returns also so it will be nice and easy to create ajax stuff on your cart. I had good idea to make the user fields custom, so you could choose from admin what fields you want to ask on checkout process... but that is little bit harder than I first thought, since then I don't know what fields to save -> it would make next to impossible to build good backend for orders management. So my next idea is to have few defaults (name, address, city, zip, country, phone etc) and have few options on those (not in use / optional / required etc). Next I will implement first payment module. My plan is to have payment modules with naming convention like this: PaymentPaypal, PaymentInvoice etc.. Ryan, what is the best way to look for installed modules that start with word "Payment"? Or should I use some other way to find payment modules? Like creating abstract module and implement payment modules from there? I will soon push this to GitHub. https://github.com/a...for-ProcessWire
  3. Welcome to the forums Juan! If I remember correctly Spanish language pack was more or less test case for Ryan and translation provided by Google. I am not 100% sure this is the case though, so you might wait for Ryan to confirm this before you start writing Spanish language pack from scratch
  4. Just noticed that setlocale() stops working if you have multilang support installed.. and this is probably pretty common situation setlocale(LC_ALL, 0) returns C, no matter what you set it before. Not sure if this is related: http://stackoverflow.com/questions/3398113/php-gettext-problems
  5. Ryan, that would be great!
  6. wortell, welcome to the forums. That is just an css issue with demo site & comments that has been there since beginning. Don't remember exact fix there, but probably changing .CommentForm_text clear: both to clear: left. Or then adding float: left.
  7. Yep. I think now that when in 2.1. switch was made from page based permission to template based permission all those page view / edit / create permission should be given only on template level. More custom permissions should be there as role based.
  8. I have stumbled many times for this: I have added new roles (usually created through API) I go to access tab of "extranet_home" template I add view permission for these new roles for that template I test this and user cannot access extranet home page. This problem is because "view" access need to be added in two places: template access tab and also role needs "view pages" permission. It would be great that it wouldn't be possible to add view access on tab, if that role doesn't have view access at all. Or other solution (not sure if I understand all the side effects): remove view permission all together. There is no create page permission either, only setting on access tab.
  9. Diogo is right. There is also textformatter for nl2br, so just use regular textarea and edit it details page and add "Newlines to XHTML line breaks" textformatter. You probably need to install the required module first: Newlines to XHTML Line Breaks
  10. I started to write this post and at the same time figured out the answer from source. Decided to post my problem, since this is something that is currently missing from cheatsheet (not sure if everything should be there). I create page from API and I need to set that it children get sorted by custom field called candidate_number. How to set that from API? This is how: $p->sortfield = $fields->get('v_candidate_number');
  11. You were concerned about performance if there are many relations defined. Page relations are fast, since they get pages directly with ID so I don't believe there will be any issues in this regard. Haven't really tried with that many relations (probably something like 20 is my max), but I assume that it will be fast. Of course if have something like 100 related pages and then you need to load all those pages in memory, then you will have some challenges for sure. What is important though is to choose right kind of inputfield (it defines HOW you choose relative pages when editing). If you want to choose any pages from your site I think then you will have two options: PagelistSelectMultiple or the new PageAutocomplete. Other inputfields need to load all the pages to show the available pages for you, so they will be impossible to use if you have many pages. But those two that I mentioned are very handy in your situation, since first will let you browse page tree and other one is ajax search (start typing and it will suggest pages for you).
  12. Remove that limit=5 and it should work fine.
  13. I assume it tries to paginate those also. Can we see your navigation code?
  14. Yes, Pete is right. You have only 5 posts and you want to paginate them 10 per page. No pagination possible in that scenario. What I tried to explain earlier is that you should use the exact same PageArray to paginate than to output. So take your first code and add this below it (after the first foreach): $pagination = $posts->renderPager(); echo $pagination;
  15. What code you use to output those blog previews? You should use same PageArray there so your pagination would match the actual content. Something like this: <?php $blogEntries = $page->find("limit=10, template=blog-entry, sort=date"); foreach ($blogEntries as $entry) { echo $entry->title; echo "<br />"; } $pagination = $blogEntries->renderPager(); echo $pagination;
  16. Your selector "id>1, limit=10, sort=date" chooses whatever pages but not homepage. You probably want to add ie. template filter there, something like this: "id>1, limit=10, template=blog-post, sort=date". That selector assumes that you have template called blog-post.
  17. If variants are child pages, then there won't be this problem. And I have (once again) turned my head and I do think that is the direction we should take. At least variants which have things like SKU and stock count should have their own page in catalog side also. I don't see issue about "product data could be changed after having already been sold". I think that is possible with every eCommerce software. After sale I think what we need to store per product are product title, id, qty sold and price. If that product is later removed or edited for something totally different (you shouldn't do that user!), we still have the record what customer bought and what was the price. I think you are probably meaning more about variants here, but I think that will be same case if we use pages for variants also. I actually have few days for real work with shop module next week, since I will build the actual shop why I started this module. So I believe I have some nice updates here also. What I at least hope to do is one or more payment modules and more stuff on backend (like sales statistics etc). This shop won't need product variants and stuff like that, but I hope that I will have time to build more solid ground for future progress. EDIT: Forget to say that it seems Ryan has had good progress with repeatable fields. That could be one nice possibility for variants also - we will see I also think that variants is not the first issue to solve: we need to focus building solid elements and add advanced stuff later on. I know I have spoken about those a lot too, since they are problem where there isn't easy or clear solution, that is the reason it is so interesting to solve I guess
  18. If I remember correctly it requires one line command to update origin repo after renaming. Probably some kind of mirroring from old repo is possible but not sure...
  19. No, not yet. Ryan has mentioned a method to export & import templates with fields using JSON. That would be great in many ways. Currently it is easy to export full site profiles, but that doesn't help in your scenario. Or other scenario where you want transfer certain templates from one site to an another (ie. you have build great product catalog on site X and want it to site Y also). One way is to build module that creates all the required fields and templates, but I find it pretty cumbersome for that task. Ryan: have you had time to look into this? I am available to help here, since this is very important stuff for our company. If you can share your initial thoughts on this, and I could try taking this further from there.
  20. Two quick notes/ideas: For topbar: disable template caching for logged in members (I think that is default anyway and don't remember if you can change that currently) Use ajax to get latest comments from forums, then your html could be fully cached and you pull those comments on client side.
  21. Welcome Gilles Almost every item on pw is a "page". You would actually create pages for your quotes also, so that is why Ryan told that 200 000+ pages. You could compare it with Drupal node or single row in database table.
  22. You are probably right achabany! There probably should be this little meta tag in admin theme to prevent Compatibility modes from IE and force latest rendering: <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  23. IE8 should be supported. I don't know what method Ryan is using for browser sniffing, but it seems to fail in that situation for some reason.
  24. Marty, there shouldn't be any mouseenter left (https://github.com/apeisa/Thumbnails/blob/master/InputfieldCropImage/InputfieldCropImage.js). Are you sure that isn't coming from browser cache?
  25. I think that process should be right after install, so there have been something strange in your situation raydale.
×
×
  • Create New...