Announcement

Collapse
No announcement yet.

Using Fragments for product related offers

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

    Using Fragments for product related offers

    I have found this community very useful so far in building Actinic sites. However, I have not been able to find any discussion or solutions to the following...

    The site in question is a Music Download site currently with 6 music genres created as 6 main sections with artists listed as sub sections under each Genre section. Then each record is listed under each artist as a sub section, within each record section I use a fragment header with all the products available under that.

    So, here is the problem. Say I have a special offer in the Classical genre and I want to only show it to people viewing the classical genre rather than Pop for obvious reasons. Simple I hear you say, just add another fragment within the classical genre section. But, here is my problem, I want it to be displayed to the left underneath the cart display which is under the quick search, under the side menu. I will also probably like to display some adverts or items to the right sometimes.

    So, how can you edit the main Act_Primary.html to display the fragment according to the section you are viewing while not displaying within the section the fragment the primary template is calling.

    I have pasted the area of html from the primary template I am using where the cart box is shown and anticipate I would place the fragment code just before the coupon entry.

    </tr>
    </table>

    NETQUOTEVAR:SIMPLESEARCH<br>
    <table width="100" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
    <td background="pxl_red.gif">
    <div align="center"> <span class="actxxsmall">
    <script language="JavaScript">
    <!--
    document.write("NETQUOTEVAR:CARTCOOKIEITEMS&nbsp;" + getCartItem(3)+"&nbsp;<BR>");
    document.write("NETQUOTEVAR:CARTCOOKIEVALUE&nbsp;" + getCartItem(1));
    // -->
    </script>
    </span> </div>
    </td>
    </tr>
    </table>

    <!-- coupon entry begins -->
    NETQUOTEDEL:CAPTURECOUPON

    As to what I will place within the fragment will be banners, html code or even just the basic fragment entries.

    I look forward to comments, suggestions, help! Thanks in anticipation of help from the community.

    Martin

    #2
    Different &quot;fragments&quot; for different sections

    Hi

    I have done a similar thing but with Best Sellers, but I did it by creating a template for each of the different sections, then I used a separate custom var for each and matched that custom var to a text file containing the code i wanted to add

    this meant when i wanted to change the offer/best sellers i only had to edit the text file and not the template

    you can associate the new templates with each of the top level sections

    i hope this helps

    Jane
    Jane

    Comment


      #3
      Thanks Jane for your suggestion.

      So you are not using the primary template to show the "Best Sellers" I guess you are displaying this in the section? Or did you add the customvar into the primary template?

      I suppose you thought about this and maybe like me, thought about using a fragment but maybe a fragment is not suitable and your suggestion of a customvar is going to work better?

      As with most administators you will want to have to do the minimum amount of work to place new offers etc... for each relevant section. I thought using a fragment and a link to it within the primary template would be easiest but maybe it is not possible?

      Anyone else up to the challange?

      I may not reply for a little while as am away for a few days now but will be checking when I can and will get back on Monday.

      Martin

      Comment


        #4
        There is no need to create different templates for each section - add the CUSTOMVAR into the Act_Primary template where you want it to appear and then call the CUSTOMVAR at each genre section level... as Jane has done simply create the 6 pages for the 6 genres - the viewer will only see the Classical CUSTOMVAR when in the Classical section, Rock CUSTOMVAR when in the Rock section etc.

        Fragments are set up to be included as part of the main central body of info / text so you can't move them around the page to under the side bar etc


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment

        Working...
        X