Announcement

Collapse
No announcement yet.

Product Ref in Filter Results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Product Ref in Filter Results

    This does not seem to be as easy as it should be.

    We would like to include a product reference in our filtered results. Unbelievably this is still not a tick box option in Search and filtering options.

    So it appears I have to edit the Search Results and the Filtered Product Layouts.

    ie see http://community.sellerdeck.com/showthread.php?p=340125#post340125

    I have done this and the Ref appears to be there for a fleeting second before disappearing.

    I have tried lots of different options of including the Search product ref and the normal product ref but nothing seems to work. I have tried in v16 as well.

    You can see the results here.

    https://www.cottonpatch.co.uk/acatal...l-Fabrics.html

    Also why do some items not appear in the filter options list. For example the Coastline pack which is the first item is from Manufacturer Art Gallery, but that does not appear in the Manufacturer list.
    David Sewell
    The Cotton Patch
    http://www.cottonpatch.co.uk
    http://www.rotarycuttershop.co.uk

    #2
    Amazingly, this hack I did in 2006 still seems to work:
    _______________________________________
    Showing Product Reference in the Search results.

    Edit SearchScript.pl (in Site1)

    Look for
    Code:
    			($status, $sTemp) = ACTINIC::ProcessEscapableText($Product{NAME}); # properly encode the text
    Change to
    Code:
    			my $sRefTemp = $$rarrResults[$nCount];	# the internal product reference
    			$sRefTemp =~ s/.*!//;			# lose any duplicate id's
    			($status, $sTemp) = ACTINIC::ProcessEscapableText(' ' . $sRefTemp . ' - ' . $Product{NAME}); # properly encode the text
    Note this simply puts the reference in front of the product name. Edit the last line to alter the sequence or add something like Ref:.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thank you Norman, I will give that a go on my test site and report back.
      David Sewell
      The Cotton Patch
      http://www.cottonpatch.co.uk
      http://www.rotarycuttershop.co.uk

      Comment


        #4
        A better solution is to simply put:
        Code:
        <Actinic:S_PRODREF></Actinic:S_PRODREF>
        Into your Search Results layouts.

        Note that if you have Index Duplicates set, you'll see 1!prodref type references.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          UPDATE: The stuff I've posted above only seem to work on the Search Results.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Yes I had tried the <Actinic:S_PRODREF></Actinic:S_PRODREF> and this only seems to hold on the Search Results, Filter Results seem to be generated on a whim and a prayer as changing the "Filtered product summary layout is used to display products before you click on a filter" does not hold for me either.
            David Sewell
            The Cotton Patch
            http://www.cottonpatch.co.uk
            http://www.rotarycuttershop.co.uk

            Comment


              #7
              There is now a Knowledgebase article on how to add Product Refs and Custom Refs to Filtered Results. Have tried this in v14 and assume it works in v2016. Very useful

              http://community.sellerdeck.com/showthread.php?t=56922
              David Sewell
              The Cotton Patch
              http://www.cottonpatch.co.uk
              http://www.rotarycuttershop.co.uk

              Comment


                #8
                It is still not there in v16 but there is a workaround from GG at SD

                Please create a variable that is the same as the one on the image at the end.

                Then open the layout 'Standard Search Result' and add the following code to the top of that layout: -

                Code:
                <script type="text/javascript">
                        function Template1(vTestSearchUDP)
                        {
                        var sResult = vTestSearchUDP;
                        return (sResult);
                        }
                </script>
                The scroll to the bottom of that layout and remove the end script tag: -

                Code:
                </script>
                at the bottom of the layout.

                Then add the following code wherever you would like the product code to appear: -

                Code:
                Product Code: <actinic:variable name="SearchResultProductReference" />
                and click 'OK'.

                Once you have done this open the JavaScript file:-

                actinicsearch.js

                and scroll down to approximately line: 2857, where you should see: -

                Code:
                    sTemplate = sTemplate.replace(/(<Actinic:S_STOCK><\/Actinic:S_STOCK>)/ig, objProductDetails.m_nStockLevel);
                Immediately below this line, create a new line and add: -

                Code:
                    sTemplate = sTemplate.replace(/(<Actinic:S_PRODREF><\/Actinic:S_PRODREF>)/ig, objProductDetails.m_sProdRef);
                then save and close the file.



                Thanks to Gary Green - please (Moderator: move to v16 if more appropriate)
                Jonathan Chappell
                Website Designer
                SellerDeck Website Designer
                Actinic to SellerDeck upgrades
                Graphicz Limited - www.graphicz.co.uk

                Comment

                Working...
                X