Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Wellton

    (@wellton)

    Thanks!

    That solved the problem ??

    Thread Starter Wellton

    (@wellton)

    First I loop all the posts to display them on one single page. Then inside that loop i’m using this code to loop through the list items:

    <?php  if ( function_exists( 'ot_get_option' ) ) {
    
      $retailers = get_post_meta($post->ID, 'retailers', true);
    
      if ( ! empty( $retailers ) ) { ?>
      <ul class="retailers clearfix">
       <?php foreach( $retailers as $retailer ) {
          echo '<li>';
          if ($retailer['retailerlink']) {
          echo '<a href="';
          echo $retailer['retailerlink'];
          echo '" target="_blank">';
          }
          echo '<img width="100" src="' .$retailer['retailerimage'] . '" /></li>';
          if ($retailer['retailerlink']) {
          echo '</a>';
          }
        } ?>
        </ul>
        <?php
      }
    
    }
    ?>
    Thread Starter Wellton

    (@wellton)

    Ooops, my bad. the code above is outside the loop

    here is the right one:

    Array
    (
        [_edit_last] => Array
            (
                [0] => 1
            )
    
        [_edit_lock] => Array
            (
                [0] => 1390375743:1
            )
    
        [_wp_page_template] => Array
            (
                [0] => default
            )
    
        [specs] => Array
            (
                [0] => a:10:{i:0;a:2:{s:5:"title";s:16:"Sk?rmstorlekar:";s:4:"spec";s:6:"26-55"";}i:1;a:2:{s:5:"title";s:14:"VESA Standard:";s:4:"spec";s:21:"100 / 200 / 300 / 400";}i:2;a:2:{s:5:"title";s:6:"F?rg:";s:4:"spec";s:5:"Svart";}i:3;a:2:{s:5:"title";s:15:"Inf?llt l?ge:";s:4:"spec";s:4:"28mm";}i:4;a:2:{s:5:"title";s:15:"Utf?llt l?ge:";s:4:"spec";s:5:"260mm";}i:5;a:2:{s:5:"title";s:7:"Vinkla:";s:4:"spec";s:10:" -2°~+7o";}i:6;a:2:{s:5:"title";s:5:"Vrid:";s:4:"spec";s:11:"-20°~+20°";}i:7;a:2:{s:5:"title";s:5:"Vikt:";s:4:"spec";s:5:"7,5kg";}i:8;a:2:{s:5:"title";s:14:"Lastkapacitet:";s:4:"spec";s:5:"40 kg";}i:9;a:2:{s:5:"title";s:7:"Garanti";s:4:"spec";s:5:"5 ?r";}}
            )
    
        [video_id] => Array
            (
                [0] => 3YtL8Us65Bo
            )
    
        [retailers] => Array
            (
                [0] => a:11:{i:0;a:3:{s:5:"title";s:5:"Pause";s:13:"retailerimage";s:61:"https://test.multibrackets.com/wp-content/uploads/pauselogo.jpg";s:12:"retailerlink";s:99:"https://www.pauseljudbild.com/produkter/tillbehor/till-tv/multibrackets-m-vesa-super-slim-tilt-turn/";}i:1;a:3:{s:5:"title";s:5:"Misco";s:13:"retailerimage";s:61:"https://test.multibrackets.com/wp-content/uploads/miscologo.jpg";s:12:"retailerlink";s:103:"https://www.misco.se/product/product.aspx?P_ItemId=7171385&SearchString=Super%20Slim%20Tilt%20%26%20Turn";}i:2;a:3:{s:5:"title";s:9:"Webhallen";s:13:"retailerimage";s:65:"https://test.multibrackets.com/wp-content/uploads/webhallenlogo.jpg";s:12:"retailerlink";s:85:"https://www.webhallen.com/hemelektronik/132002-multibrackets_vesa_super_slim_tilt_turn";}i:3;a:3:{s:5:"title";s:12:"Ljudkallaren";s:13:"retailerimage";s:67:"https://test.multibrackets.com/wp-content/uploads/ljudkallarnlogo.jpg";s:12:"retailerlink";s:43:"https://www.ljudkallarn.com/?artnr=MBMVESSTT";}i:4;a:3:{s:5:"title";s:6:"Dustin";s:13:"retailerimage";s:66:"https://test.multibrackets.com/wp-content/uploads/dustinhomelogo.jpg";s:12:"retailerlink";s:43:"https://www.dustinhome.se/pd_5010465476.aspx";}i:5;a:3:{s:5:"title";s:8:"Dagspris";s:13:"retailerimage";s:64:"https://test.multibrackets.com/wp-content/uploads/dagsprislogo.jpg";s:12:"retailerlink";s:50:"https://www.dagspris.se/PartDetail.aspx?q=p:3462896";}i:6;a:3:{s:5:"title";s:3:"DPJ";s:13:"retailerimage";s:59:"https://test.multibrackets.com/wp-content/uploads/dpjlogo.jpg";s:12:"retailerlink";s:78:"https://www.dpj.se/tv-stativ/425-multibrackets-m-vesa-super-slim-tilt-turn.html";}i:7;a:3:{s:5:"title";s:6:"EverIT";s:13:"retailerimage";s:62:"https://test.multibrackets.com/wp-content/uploads/everitlogo.png";s:12:"retailerlink";s:81:"https://www.everit.se/products/37500/multibrackets-7-350-022-734-036-7350022734036";}i:8;a:3:{s:5:"title";s:14:"Lars Bengtsson";s:13:"retailerimage";s:69:"https://test.multibrackets.com/wp-content/uploads/larsbengtssonlogo.jpg";s:12:"retailerlink";s:108:"https://www.larsbengtsson.se/produkter/visa/bild/vaggfasten/32-42-4/multibrackets-m-vesa-super-slim-tilt-turn";}i:9;a:3:{s:5:"title";s:7:"Kungstv";s:13:"retailerimage";s:63:"https://test.multibrackets.com/wp-content/uploads/kungstvlogo.png";s:12:"retailerlink";s:71:"https://www.kungstv.se/tv-2/vaggfasten/multibrackets-superslim-tilt-turn";}i:10;a:3:{s:5:"title";s:4:"ATEA";s:13:"retailerimage";s:60:"https://test.multibrackets.com/wp-content/uploads/atealogo.png";s:12:"retailerlink";s:93:"https://eshop.atea.com/senew/m4n?_dl=1&_locale=1&oid=etailer-product&prodid=230124&viewMode=3";}}
            )
    
        [product_link] => Array
            (
                [0] => https://multibrackets.com/4036.shtml
            )
    
        [highlights] => Array
            (
                [0] => a:3:{i:0;a:2:{s:5:"title";s:12:"Upp till 55"";s:9:"highlight";s:12:"Upp till 55"";}i:1;a:2:{s:5:"title";s:34:"Vrid, v?nd och tilta utan verktyg";s:9:"highlight";s:34:"Vrid, v?nd och tilta utan verktyg";}i:2;a:2:{s:5:"title";s:42:"28mm tunn mot v?gg - 260mm ut fr?n v?gg";s:9:"highlight";s:42:"28mm tunn mot v?gg - 260mm ut fr?n v?gg";}}
            )
    
        [_thumbnail_id] => Array
            (
                [0] => 163
            )
    
    )
    Thread Starter Wellton

    (@wellton)

    this is what i get:

    Array
    (
        [_edit_last] => Array
            (
                [0] => 1
            )
    
        [_wp_page_template] => Array
            (
                [0] => default
            )
    
        [_edit_lock] => Array
            (
                [0] => 1389888818:1
            )
    
        [_post_restored_from] => Array
            (
                [0] => a:3:{s:20:"restored_revision_id";i:28;s:16:"restored_by_user";i:1;s:13:"restored_time";i:1379932599;}
            )
    
        [background] => Array
            (
                [0] => a:2:{i:0;a:4:{s:5:"title";s:5:"hello";s:5:"image";s:0:"";s:4:"link";s:0:"";s:11:"description";s:0:"";}i:1;a:4:{s:5:"title";s:9:"hellooooo";s:5:"image";s:0:"";s:4:"link";s:0:"";s:11:"description";s:0:"";}}
            )
    
        [video_id] => Array
            (
                [0] => JD6iXZR1Vbo
            )
    
        [specs] => Array
            (
                [0] => a:4:{i:0;a:2:{s:5:"title";s:1:"1";s:4:"spec";s:0:"";}i:1;a:2:{s:5:"title";s:1:"2";s:4:"spec";s:0:"";}i:2;a:2:{s:5:"title";s:3:"tre";s:4:"spec";s:0:"";}i:3;a:2:{s:5:"title";s:4:"fyra";s:4:"spec";s:0:"";}}
            )
    
    )
    Thread Starter Wellton

    (@wellton)

    and the link to the image exists in “meta_value” with all the other values.

    Thread Starter Wellton

    (@wellton)

    Ok, so now i’ve checked one record in the database and “meta_id”, “post_id”, “meta_key” and “meta_value” are all the same except for the link to the images of course which is located at the same place as the site itself.

    Thread Starter Wellton

    (@wellton)

    Are you sure that the retailers meta field in the duplicate site is a 1 to 1 exact copy and the serialized array is imported properly?

    Well, when I copied the site I duplicate the whole wordpress folder, exported the tables using phpmyadmin, imported the tables into the new database. Souldn’t that make an exact 1 to 1 copy?

    Thread Starter Wellton

    (@wellton)

    So that is;

    Original site:
    “highlights” display on:
    backend, frontend

    “highlights” display not on:
    Custom fields

    “specs” display on:
    backend, frontend

    “specs” display not on:
    Custom fields

    “retailers” display on:
    backend, frontend

    “retailers” display not on:
    Custom fields

    Duplicate site:
    “highlights” display on:
    backend, frontend

    “highlights” display not on:
    Custom fields

    “specs” display on:
    backend, frontend

    “specs” display not on:
    Custom fields

    “retailers” display on:
    nothing

    “retailers” display not on:
    Custom fields, backend, frontend

    Thread Starter Wellton

    (@wellton)

    Hm… I looked at both the duplicate site and the original and as a mather of fact none of the list items are attatched to the post. But the list items “specs” and “highlights” does show on the front end & back end on the duplicate site.

    How to get attributes to work with this plugin?

    I really need attributes to work and i believe others also need it. Other than that, it’s perfect!

    To avoid Safari showing an empty box at the size of the thumbnail when there is no thumbnail, do this isnstead:

    global $wp_query;
    $cat = $wp_query->get_queried_object();
    $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );
    $image = wp_get_attachment_url( $thumbnail_id );
    echo wp_get_attachment_image( $thumbnail_id );
    Thread Starter Wellton

    (@wellton)

    Based on roles and capabilities which i forgot to mention°

    Thread Starter Wellton

    (@wellton)

    The thing is that I want it to show post excerpt beneath the image and also an link to the image itself. Also it going to be a advanced search, so you can choose to search by tag, categories etc. I don’t think google offers something like that. Or?

Viewing 13 replies - 1 through 13 (of 13 total)