Jump to content

Outcydaz

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by Outcydaz

  1. 1 hour ago, Robin S said:

    You can use URL segments for the category name. Or a GET variable - the principle is the same but the URL segments are nicer. Look for the URL segment in your template and then use it in a selector for your product pages.

    Thanks for the quick response. The first paragraph in your answer threw me off a little. Would i have to activate URL segments on the Category Template OR the Category Child Template? Otherwise would URL segments have to be enabled in the product templates instead?  Thank you.

    Here's and example of what i'm hoping to achieve. http://www.etro.com/en_wr/ 'Man' and 'Woman' under collections both have the same categories i.e. 'Autumn Winter 16-17' although they list different items for 'Man' and 'Woman'F / .W 2016 -17

  2. I have a site structure as follows

    Shirts
    -- Shirt One
    -- Shirt Two
    Shoes
    -- Shoe One
    -- Shoe Two

    Category
    -- Spring Summer
    -- Fall Winter

    Each page has a 'category' page field.

    I'm trying create a navigation that shows only the child categories as follows:

    Shirts
    -- Spring Summer
    -- Fall Winter
    Shoes
    -- Spring Summer 
    -- Fall Winter

    When Shirts -> Spring Summer is clicked i'd see only spring summer shirts. Same for Shoes, you'd only see Spring summer items for shoes.

    Help please.

     

  3. On 3/21/2016 at 2:56 PM, krisj said:

    Just had to do a quick head scratch to get the colour picker to work inside PW 3.12 Repeater and Repeater Matrix.

    If anyone is looking for a very quick and dirty hack, that seems to work. Not sure if it would cause any other issues.

    This is InputfieldFontIconPicker.js

     
    
    function SetUpCPicker(){
        $('div[id^=ColorPicker_]').each(function(){
            var $colorpicker = $(this);
    
            $colorpicker.ColorPicker({
                color: $(this).data('color').toString(),
                onShow: function (colpkr) {
                    $(colpkr).fadeIn(500);
                    return false;
                },
                onHide: function (colpkr) {
                    $(colpkr).fadeOut(500);
                    return false;
                },
                onChange: function (hsb, hex, rgb) {
                    $colorpicker.css('backgroundColor', '#' + hex);
                    $colorpicker.css('background-image', 'none');
                    $colorpicker.next('input').val(hex).trigger('change');
                }
            });
    
        });
    
        $('a.ColorPickerReset').on('click',function(e){
            e.preventDefault();
            var color = $(this).data('default') && $(this).data('default') != 'transp' ? '#' + $(this).data('default').toString() : 'transparent';
            $(this).parent().find('input').val($(this).data('default')).trigger('change');
            $(this).parent().find('div[id^=ColorPicker_]').ColorPickerSetColor($(this).data('default').toString());
            $(this).parent().find('div[id^=ColorPicker_]')
                .css('backgroundColor', color)
                .css('background-image', 'none')
                .attr('data-color', $(this).data('default').toString());
            if(color == 'transparent') {
                var modurl = $(this).data('modurl');
                $(this).parent().find('div[id^=ColorPicker_]')
                    .css('background-image', 'url(' + modurl + 'transparent.gif)');
            }
        });
    
        /* additions (swatches) by @Rayden */
        $('div.ColorPickerSwatch').on('click',function(e){
            e.preventDefault();
            var color = $(this).data('color') && $(this).data('color') != 'transp' ? '#' + $(this).data('color').toString() : 'transparent';
            $(this).closest('.ui-widget-content, .InputfieldContent').find('input').val($(this).data('color')).trigger('change');
            $(this).closest('.ui-widget-content, .InputfieldContent').find('div[id^=ColorPicker_]').ColorPickerSetColor($(this).data('color').toString());
            $(this).closest('.ui-widget-content, .InputfieldContent').find('div[id^=ColorPicker_]')
                .css('backgroundColor', color)
                .css('background-image', 'none')
                .attr('data-color', $(this).data('color').toString());
            if(color == 'transparent') {
                var modurl = $(this).closest('.ui-widget-content, .InputfieldContent').find('.ColorPickerReset').data('modurl');
                $(this).closest('.ui-widget-content, .InputfieldContent').find('div[id^=ColorPicker_]')
                    .css('background-image', 'url(' + modurl + 'transparent.gif)');
            }
        });
    };
    $(document).ready(function() {
        SetUpCPicker();
        $(document).on('repeateradd', '.InputfieldRepeaterMatrix .InputfieldRepeaterMatrixAddLink', SetUpCPicker);
        $(document).on('opened', '.InputfieldRepeaterItem', SetUpCPicker);
    });
     
    I posted this to github as well...

    @krisj I've tried this solution and the colorpicker still does not work in a repeater or repeater matrix. Is there something else i'm misssing?

  4. Hello All,

    I have an issue editing certain pages with specific templates. I noticed this issue after migrating from MAMP to a production server. Not sure if there's a relation there but just had to mention it.

    'Error: Call to undefined method DirectoryIterator::getExtension() (line 104 of /var/www/vhosts/.../httpdocs/wire/core/Pageimages.php) 
    This error message was shown because you are logged in as a Superuser. Error has been logged.'
     
    When line 104 in Pageimages.php is commented out i'm able to edit the pages successfully.
     
    Any help or information will be appreciated.
     
    PW Version 2.5.25 DEV
     
×
×
  • Create New...