Recent comments

  • List of recently viewed nodes in Drupal   7 years 36 weeks ago

    Neither I.
    I'm stucked with rules.I can't seem to add the right conditions,especially can't find the right token for anonymous users.Did someone managed to make it work with drupal 7?

  • Product comparison in Drupal   7 years 36 weeks ago

    To access Rules administration you'll need to enable both Rules and Rules Administration UI modules. A new Rules item will show up in your navigation menu.

    To write your own form submit handler, you'll need to create a custom module. The best source of information on developing modules and using Drupal's Form API would be http://drupal.org/developing/modules and http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html.

    Sorry I can't give you a ready to go code, I'd have to set up the whole thing locally to see if it even works. But as I keep thinking about a solution to your problem, I am confident the one I suggested would work. On the form submission, you just flag the selected node with the comparison flag.

    I hope that helps, let me know how you go.

  • Product comparison in Drupal   7 years 36 weeks ago

    Thanks Jan, i will give it a try. Got the Rules and Rules forms, but cant find place to access rules. Could you give me heads up where to dig them, so that i can configure them as needed.

    Second, how to access "Add car"submit handler, cant find any option to edit. Should i go to back end and edit that line of code in PHP file??? If yes little heads up needed there as well to understand the back end structure of Drupal.

    Many thanks.

  • Product comparison in Drupal   7 years 36 weeks ago

    Thanks Gaurav!

    Sorry, the page is failing on me. It displays all Audis and more cars cannot be added. Whatever I add it just comes up with an empty page...

    Anyway, you should be able to do what you're after in the submit handler of the Add Car form. Just flag the selected car's node like so

    flag('flag', 'comparison', $nid);

    When the page loads back, you should have the new node in the table.

    You'll either have to implement it in a module of your own, or you might be able to use the Rules Forms Support module for it.

  • Product comparison in Drupal   7 years 36 weeks ago

    Hi Jan, Congratulation for your marriage.

    Your tutorial is very helpful and i successfully managed to create a product comparison that allow products to be flagged while traveling thru site and then listing them all in nice table (thanks to view hacks). All good.

    After achieving this, i am wondering if we can do one notch higher version of providing dropdown too on comparison matrix page to add more products without user have to travel again to add more products to comparison matrix page???

    www.carnity.com/carnity. go to >> car details >> Audi >> Audi A1 add product and use comparison button on top menu to load flagged products.

    prototype example (but non working): http://carnity.com/carnity/?q=compare

  • Product comparison in Drupal   7 years 36 weeks ago

    Cheers, Karl!

    You could use Rules module. Flags include support for Rules which makes it possible for you to fire actions when content is flagged/unflagged with the Include in comparison flag. Now the action here would be a short PHP snippet to assign the node's term to a $_SESSION variable.

    I don't have access to a testing platform from where I am now, but give it a thought and let me know if you'll be able to work it out.

  • Product comparison in Drupal   7 years 36 weeks ago

    Thanks for your answer, and congratulations for your marriage.

    I do not understand how to save the session variable for the first selected term. Do I need a custom module for this? Actually I'm afraid I didn't get your idea at all.

    Concerning the second issue, I'm now editing the view template (rather a copy in my theme of course) and will come back with comments about the results.

  • Product comparison in Drupal   7 years 36 weeks ago

    Actually both of them are quite tricky.

    For the term specific product comparison, I would consider saving the first selected product's term in a session variable. I would then include a filter in my view with a piece of PHP to retrieve that value, and would only display the comparison link for products with the same term.

    I haven't tried it myself, but it sounds easy said so I guess it won't be that easy to implement. Let me know if you come up with a solution.

    The latter one I would find easier to achieve. I believe it is just a matter of view theming. When you're going through the table style template, just compare individual fields and -- in case the values are all identical -- add a class to the entire row.

  • Product comparison in Drupal   7 years 36 weeks ago

    I've been gone getting married. Sorry guys! :-)

    Christian, I'd have to see your code to be able to tell what the problem could be. From what you're saying it looks like a for cycle gone wrong, rewriting the output variable or something similar. Most probably just a minor thing, although easily overlooked.

  • Product comparison in Drupal   7 years 38 weeks ago

    Hi Jan,

    great tutorial. Thanks a lot.

    I build the comparsion table in D7, and it works great, except for one thing. When changing the template file to the one described here http://drupal.org/node/1256078 just the last product added to the comparsion appears.

    When using the no flipped table all appear.

    Any idea?

    Thanx Christian

  • Product comparison in Drupal   7 years 41 weeks ago

    Ideas? Is it possible at all using this type of product comparison?

  • The Pomodoro Technique 3: Pros and Cons   7 years 42 weeks ago

    I try to stick to the rules pretty strictly. I defer external interuptions by wearing headphones. If it isn't important enough, people will usually leave on their own. If they truly interupt, then I cancel the current pomodoro.

    RE: Small unplanned tasks. I incorporate a catch-all pomodoro just after lunch where I "stash" unplanned and short tasks. If I only have 3 5-minute emails to send, I can take my time composing them and fill up the whole time without feeling I cheated.

  • The Pomodoro Technique 3: Pros and Cons   7 years 42 weeks ago

    what would you do if you have 5 tasks that only take 3 or 5 minutes? like a quick call, or a 10 minute meeting, etc

    I think it is better to mark a full pomodoro and group all those tasks

  • The Pomodoro Technique 3: Pros and Cons   7 years 42 weeks ago

    Looking back at the book, it says in 2.1.3 "If you finish an activity in the first five minutes of the Pomodoro and you feel like the task was actually already finished during the previous Pomodoro and revision wouldn’t be worthwhile, as an exception to the rule the current Pomodoro doesn’t have to be included in
    the Pomodoro count"

    So if I have something that spills over and only takes 5 mins I just rewind

  • Product comparison in Drupal   7 years 43 weeks ago

    Awesome tutorial my friend, I've set up a nice product comparison in my uc-based store thanks to your help!

    I have two questions I hope you can guide me. First, how can I limit the product comparison to items belonging to the same category (associated to the same taxonomy term)? Because does not make sense to compare t-shirts and TVs... I have SessionAPI enabled to allow anonymous comparison as per your suggestion.

    The second one I'm afraid is tricky: how can I assign a class to identical fields among compared products, or any other way to stress out common fields with a different background color?

    Thanks a lot for all your help!

  • Product comparison in Drupal   7 years 45 weeks ago

    and also the module views_flag_refresh

  • Product comparison in Drupal   7 years 45 weeks ago

    I added the ajax and ajax_views_refresh module and turned the ajax on in the compare-product views.

  • Product comparison in Drupal   7 years 45 weeks ago

    Note that uc_products view (path starting with /products) is different from the Catalog taxonomy page (path starting with /catalog).

    To change the catalog theming, you may want to override a theme function defined by the uc_catalog module, most likely the uc_catalog_product_grid.

    Hey, how did you get the flagged list refreshing done in the Comparar block?

  • Product comparison in Drupal   7 years 45 weeks ago

    I have implemented the product comparison in my site. I have a block that shows the flagged products and am able to remove the product from compare in the block. I also have a compare and remove on each product page.

    I am trying to add a flag "button" to add and remove from the compare products at the Product Catalog Grid (like when I click a main category and it shows all the products in that category). I tried to add a flag in the uc_products.

    Do you know if it is possible to put the product compare button on each product? http://www.mtek.net.br/catalog/2

  • Programmatically creating menu items in Drupal   7 years 47 weeks ago

    This was really helpful. Module URL Alter creates hooks for the aforementioned functions so that modules can implement custom own URL rewrite rules. This has been integrated into the core in Drupal 7. Thank you.

  • The Pomodoro Technique 3: Pros and Cons   7 years 47 weeks ago

    That's right! At first the Pomodoro rules seem very strict and it may take some time to get used to them, and also find your way in real life situations.

    The Pomodoro book teaches to use the entire Pomodoro for the planned task and even when done with the task, to use the remaining time to review the job. Also, we're supposed to combine short tasks into a single Pomodoro. Instead, though, it is often more sensible to squeeze in short task at the end of Pomodoro.

    Like you say, for the sake of flexibility, that's what I do. When starting with the technique, though, it is a bit frustrating that the Pomodoro book doesn't seem to be dealing with a few quite frequent real life scenarios.

  • The Pomodoro Technique 3: Pros and Cons   7 years 47 weeks ago

    I'm using pomodoro for a couple of months, these are my answers to those cons.

    If you have some short tasks, I suggest to set several mini-tasks to fill a complete pomodoro or do those while you are in your "planning pomodoro", first one of the day.

    If you face those mini-tasks during a pomodoro, common sense is to do it if are urgent, do not void pomodoro if it is a less than a quarter of the time of your pomodoro

    I would say Keep it flexible to your own criteria and needs!

  • Programmatically creating menu items in Drupal   7 years 48 weeks ago

    Thanks!!!! It works!

  • Programmatically creating menu items in Drupal   7 years 48 weeks ago

    When using anything nontrivial for the path, such as the loaded node's path property, always use drupal_get_normal_path() to normalize its value!

    Try

    'link_path' => 'node/' . $node->nid,

    or
    'link_path' => drupal_get_normal_path('news/' . $node->nid),

  • Programmatically creating menu items in Drupal   7 years 48 weeks ago

    Hi, I'm working with Drupal7, and I've followed your instructions to add an hidden item to Main Menu after creating and updating o node.
    I've installed Rules Module, I've created a new rules and activate "Debug rules evaluation", but even in Report Log page I can't see anything.

    This is my custom php code

    $item = array(
    'menu_name' => 'main-menu',
    'link_path' => 'news/' . $node->nid,
    'link_title' => $node->title,
    'mlid' => 0,
    'plid' => 452,
    'hidden' => 1
    );
    menu_link_save($item);

    menu_cache_clear_all()

    but it doesn't work.
    What I'm doing wrong? Can you help me?