Announcement

Collapse
No announcement yet.

Should I upgrade from Business v7 to v8?

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

    #46
    Here's some more good stuff related to this.
    Below is a modified version of the 10 words of reduced product description (AUG 1.2 page 19) that works with the same DuplicateIndex block to automatically reduce the product description to the first 15 words if it is seen as a duplicate.
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22DuplicateIndex%22%20%2f%3e%20%3e%200" > 
    <actinic:block php="true" >
    $sShort = "";
    $nCount = 0;
    $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />'; 
    foreach(explode(" ", $sOriginal) as $sWord)
    	{
       if ($nCount > 15)
       	{
       	$sShort .= "...";
       	break;
       	}
       $sShort .= $sWord . " ";
       $nCount++;
       }
    echo $sShort;
    </actinic:block>
    <br><A HREF =http://<actinic:variable name="DomainName" />/cgi-bin/ss00000<actinic:variable name="PerlIDNumber" />.pl?PRODREF=<actinic:variable name="ProductReference" />&NOLOGIN=1 TARGET="_self">MORE INFO...</A>
    </actinic:block>
    
    
    <actinic:block if="%3cactinic%3avariable%20name%3d%22DuplicateIndex%22%20%2f%3e%20%20%3c%3d%200" >        
             <actinic:variable name="ProductDescription" />
    </actinic:block>
    It also adds a cgi-bin link of 'MORE INFO...' which saves having to configure any product linking on the duplicate to link to the main product.

    Note that the DomainName and PerlID variables are created manually and added to the site configuration and are not standard issue library variables. So they will need to be created and configured if the above is used.

    Comment


      #47
      It also adds a cgi-bin link of 'MORE INFO...' which saves having to configure any product linking on the duplicate to link to the main product.
      are you a mind reader? I'm working at this I've got my default dup working as I'd like along with the first 10 words etc (i use this for also boughts too - the best mod written so far!) and was now codjitating on how to get the link through to the product and hey presto!

      Comment


        #48
        anything special to bear in mind whilst creating the variables?

        domainname is www.surf-wax.co.uk
        perl id is 1

        I get the following
        Parse error: parse error in main on line 9 /cgi-bin/ss00000.pl?PRODREF=swx-paddle-uno&NOLOGIN=1 TARGET="_self">more detail...
        as you can see it doesn't use my variables, I guess I haven't defined them properly

        Comment


          #49
          You will need to create these variables in the library yourself - and also configure them once off.
          I have set DomainName and PerlIDNumber to appear in the Site only - so they are set in Site Options|Properties. PerlID is limited to a number 1 to 9.

          The product reference is also done automatically:
          Code:
          <A HREF =http://<actinic:variable name="DomainName" />/cgi-bin/ss00000<actinic:variable name="PerlIDNumber" />.pl?PRODREF=<actinic:variable name="ProductReference" />&NOLOGIN=1 TARGET="_self">MORE INFO...</A>

          Comment


            #50
            I've attached my site options properties, i also set me to site only.

            here's my code too...
            <div class="content_right" <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductColumnCount%22%20%2f%3e%20%3d%3d%201">style="width: 250px;"</actinic:block>>
            <a name="<Actinic:Variable Name="EncodedProductAnchor"/>">
            <b><Actinic:Variable Name="ProductName"/></b></a>

            <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductReferenceVisible%22%20%2f%3e" >
            Ref: <actinic:variable name="ProductReference" />
            </actinic:block>

            <br /><actinic:block if="%3cactinic%3avariable%20name%3d%22DuplicateIndex%22%20%2f%3e%20%3e%200">
            <actinic:block php="true" >
            $sShort = "";
            $nCount = 0;
            $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />';
            foreach(explode(" ", $sOriginal) as $sWord)
            {
            if ($nCount > 10)
            {
            $sShort .= ...";
            break;
            }
            $sShort .= $sWord . " ";
            $nCount++;
            }
            echo $sShort;
            </actinic:block>
            <A HREF =http://<actinic:variable name="DomainName" />/cgi-bin/ss00000<actinic:variable name="PerlIDNumber" />.pl?PRODREF=<actinic:variable name="ProductReference" />&NOLOGIN=1 TARGET="_self">more detail...</A>

            </actinic:block>
            <actinic:block if="%3cactinic%3avariable%20name%3d%22DuplicateIndex%22%20%2f%3e%20%20%3d%3d%200" >
            <actinic:variable name="ProductDescription" />
            </actinic:block>
            Attached Files

            Comment


              #51
              Is it working ok now then? Did you close the '<div class="content_right"...'?

              Comment


                #52
                its not quite working yet, but I've broken down the bits of code and on its own the link and the varaibles for the url and perlID work.

                Thus I just need to tidy up my sloppy coding to find my error, I'll do it tomorrow.

                I'll post a definatinve guide for the AUG once it works as defined

                Comment


                  #53
                  It also adds a cgi-bin link of 'MORE INFO
                  Could this be a relative link as the Ses will not follow the cgi link too well and they need to get to the single product page easily.

                  Comment


                    #54
                    Originally posted by RuralWeb
                    Could this be a relative link as the Ses will not follow the cgi link too well and they need to get to the single product page easily.
                    Perhaps although I've only been able to do it with a cgi link so far. I haven't looked to see if it's possible to reference a variable for the section page name yet. I would also prefer it to be a relative link.

                    Comment


                      #55
                      Your doing a grand job duncan keep it up

                      Comment


                        #56
                        I think that automating a relative link will be very difficult; maybe not possible - even if there was a variable with the section name it wouldn't be the section page.

                        However there is another way - that is to use the standard Simple Link - this can be populated easily from an export in Excel then re-imported again.

                        I'm going to stick with cgi links for the time being - I had variable results with cgi links iin V7. It would be quite easy to go the Excel route later.

                        My V8 test site is now working well - I only have to create a duplicate - the cut down template, thumbnail image, and reduced 10 word description as well as the cgi links on the 'more info...' and thumbnail image tat are required for it is automated through the layout blocks.

                        Comment


                          #57
                          I'm putting this on hold for my sites, I need to think through the effect of only having cgi links from the product duplicate lists through to one product per page.

                          Comment


                            #58
                            the effect of only having cgi links from the product duplicate lists through to one product per page.
                            As you say jo this is a bit of a show stopper as we need to get the spiders in easily. I will ahve a play over the next few weeks.

                            Comment


                              #59
                              Use PHP to create the relative link?!

                              Regarding the relative links instead of cgi links.. A thought suddenly came to me - PHP.

                              I always use the product name as the page name for the single section product page.

                              There must be a way to write some simple PHP to convert the Actinic variable containing the product name and converting it to a page name - replacing the spaces with dashes ort underscores (as per another variable say). I'm looking into this.

                              Comment


                                #60
                                Relative link is working...

                                Update - I now have this working!

                                So long as the parent (single product per page) section has the same name as the product name (with the exception of the spacing character then it automatically creates relative links on the duplicate image and 'more info...' text.

                                The PHP code to do this is here:
                                http://community.actinic.com/showpos...42&postcount=2

                                Comment

                                Working...
                                X