Posts by DigitalFame

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

Hi there!

I want to list images from nextgen gallery using tags. Which is not a big deal BUT in this case I need images belonging to multiple tags:

pseudo example: get_objects_in_term_intersection(array(“141”,”144”), “ngg_tag”);

So I only need objects which belong to BOTH 141 and 144 (or any number of tags passed through the array). Nextgen uses `get_objects_in_term()` from `wp-includes/taxonomy.php` from line 494. I guess I should change the sql query in the function but this is way out of my league.

The original function:
 function get_objects_in_term( $term_ids, $taxonomies, $args = array() ) {
    global $wpdb;

    if ( ! is_array( $term_ids ) )
        $term_ids = array( $term_ids );

    if ( ! is_array( $taxonomies ) )
        $taxonomies = array( $taxonomies );

    foreach ( (array) $taxonomies as $taxonomy ) {
        if ( ! taxonomy_exists( $taxonomy ) )
            return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
    }

    $defaults = array( 'order' => 'ASC' );
    $args = wp_parse_args( $args, $defaults );
    extract( $args, EXTR_SKIP );

    $order = ( 'desc' == strtolower( $order ) ) ? 'DESC' : 'ASC';

    $term_ids = array_map('intval', $term_ids );

    $taxonomies = "'" . implode( "', '", $taxonomies ) . "'";
    $term_ids = "'" . implode( "', '", $term_ids ) . "'";

    $object_ids = $wpdb->get_col("SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tt.term_id IN ($term_ids) ORDER BY tr.object_id $order");

    if ( ! $object_ids )
        return array();

    return $object_ids;
    }

Thnx in advance!

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

Hi!

Thanx for the reply!

Your analogy is rather funky but the attribute approach is what I need :) Then I guess I can display the attribute on front`s list view instead of the original price. Thnx Again!

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

Hi there!

I`m setting up a Magento shop for a floorcovering retailer. I need to display product prices based on square meter but selling them in box which contains various amounts of boards. for example one box is 2.75m2. So when you increase quantity in the cart is actualy in ‘boxes/cartons’.

A similar example can be found here: ukflooringdirect.co.uk

Questions: - Is this possible to achive ‘out of the box’ ? - If not, is there a (RELIABLE) plugin for that ?

If anybody has the interest helping me out or showing me the right direction, wheter for free or for money please contact me or drop an answer here.

Thanks!

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

WickedPixel: Entry #1

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

Thanx to everyone for the nice words!

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says


I`ve just made a report on myself!

This dude is awesome.

Welcome to the marketplace & the forums, DigitalFame! :)

Thnx!

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

Yo, welcome, congrats and relax a little. :) The link will be removed and all will be OK.

Thnx!

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

Come on Folks! I don`t want any flame around it, just made a simple mistake. I reported it myself, so they will delete it, I guess.

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

I`ve just made a report on myself! :) The rule is the rule is the rule…

12 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 and 100 dollars
  • United Kingdom
DigitalFame says

~ cough ~ read forum rules ~ cough ~ mumble mumble ~~

:)

by
by
by
by
by
by