Jump to content

johnw

Registered Users - Approved
  • Posts

    28
  • Joined

Posts posted by johnw

  1. Has anyone set up a "newest products" type of thing in their portal?

     

    I'd like to either:

    1. Dynamically populate a folder in the catalog of latest products (i.e. items added/updated in the last 30 days.)
    2. Via a button, return a search query of items with a Last Modified Date within the last 30 days.

    Any thoughts on how to accomplish this? Thanks.

  2. Digging up an old thread in case someone stumbles on this looking for an answer. This works for me to add Order Number and SKU to an imposition in MCC.

     

    1) Add the following to OnJobStart in your template:

    FusionPro.Composition.impositionSheetSlugText = (FusionPro.Composition.JobOptions["MCC_OrderNumber"]+"-"+FusionPro.Composition.JobOptions["MCC_OrderLineItemSKU"]);

     

    2) Edit the following in your MCC template setup:

    Template>Proof/Press Settings>Edit Press Settings>Info Slug:>Standard Slug

  3. So after mulling this over for awhile, I've come up with something of a hack. The biggest caveat is having access to an unused User External ID field. If your portal is using this field for an integration then you're probably out of luck. This method also uses MCC's variable field functionality.

     

    Here's how to do it:

     

    1. Enter the group name into the unused External ID field for each user. Since each External ID must be unique, I appended the ID to the User Group name in Bulk Ops to achieve this.
    2. In the appropriate Custom Content box, enter the code below. This will return a string containing the user's group name. Note display is set to none so user won't see it.
      <span id="userGroup" style="display:none;">%%User.ExternalId%%</span>
      


    3. Below that, create each group's content as shown below. You can change the IDs to something more meaningful.
      <div id="group-1-note" style="display:none;">
         Group 1 Content Here.
      </div>
      
      <div id="group-2-note" style="display:none;">
         Group 2 Content Here.
      </div>
      
      <div id="default-note" style="display:none;">
         Default Content Here.
      </div>


    4. Below that, enter the following script. Again, you're going to want to change the IDs and group names to fit your application. The script reads the content of the userGroup element and toggles on/off the display property for the appropriate content.
      <script type="text/javascript">
         var x = document.getElementById("userGroup").textContent;
         var y = x.indexOf("Group-1")
         var z = x.indexOf("Group-2")
         if (y >= 0) {
             document.getElementById("group-1-note").style.display = "inline";
             }
         else if (z >= 0){
             document.getElementById("group-2-note").style.display = "inline";
             }
         else {
             document.getElementById("default-note").style.display = "inline";
         }
      </script>


    5. You can test by impersonating users from different groups in your store.

     

    Admittedly, this could get pretty complicated depending on how many groups you have to serve up custom content for. If anyone can figure out a more efficient way, please post it.

     

    If there was a way to grab a user's group ID or a variable for one of the new generic fields, then you wouldn't need the external ID.

     

    Thanks and good luck!

  4. Hi Everyone,

     

    I have a customer that wants to use form entries on a versioned product to also populate the shipping address during checkout.

     

    My first thought was to instruct users to create a new address book entry first and then use the location info to populate the relevant fields on the versioned product form. This would work except the Company Name and Attention fields are not available for mapping prefills.:confused:

     

    Can anyone think of another way to make this work?

  5. I've found a workable solution to this.

     

    I'm hosting the following HTML file on our web server and using the path as the LogOut URL. So far it seems to work pretty well and hasn't triggered any pop-up blockers.

     

    <!doctype html>
    
    <html lang="en">
    <head>
       <title>PTI Redirect</title>
       <script type="text/javascript">window.open('http://your-url.com', '_top');</script>
    </head>
    <body>
       <!-- Insert your content here -->
    </body>
    </html>
    

  6. The RTE only allows one font. Applied styles don't work with OTF because the font file only stores one style, unlike TTF. (Someone correct me if I'm wrong on this.)

     

    I ran into this awhile back and was able to make it work by editing the Fonts.ini file (located at C:/Users/Public/Public Documents/PTI)

     

    1) Make a backup copy of this file.

    2) Open in a text editor and search for the BOLD version of the font (in my case Avenir LT Std 65 Medium.) This is what you wan the applied bold to return.

    3) Duplicate the entire entry.

    4) Change first font name (in red) to the regular version (I changed it to Avenir LT Std 35 Light).

    4) Change the style (in orange) from Regular to Bold.

    5) Change the first number (in green) from 0 to 1.

    6) Save to the location noted above.

    7) Re-collect you job and upload to MCC.

     

    Avenir LT Std 35 Light;AvenirLTStd-Medium;Bold;1;0;W;;OpenType PostScript;C:\Users\Public\Documents\PTI\FusionPro\Fonts\AvenirLTStd-Medium.bfk;C:\Users\Public\Documents\PTI\FusionPro\Fonts\AvenirLTStd-Medium.pfa;C:\Users\Public\Documents\PTI\FusionPro\Fonts\\AvenirLTStd-Medium.otf;C:\Users\Public\Documents\PTI\FusionPro\Fonts\AvenirLTStd-Medium.ufk;

     

    You will want to save your edit somewhere for future access. You will have to add it back if you ever load fonts from the FP advanced menu.

  7. Is there an easy way to add a ShadePct to a border color? The code below applies a solid Pantone 3435 border to the top of the cell. It needs to be 40%.

     

    table.Rows[1].Cells[0].SetBorders ("Thin", "Pantone 3435 U", "Top");
    

     

    Discaimer: I was able to fake it by adding another row with the ShadePct set to 40 and fiddling with the cell's content. This seems like kind of a hack and I'm curious if there's a better way. Thanks.

  8. Hi Gerard,

     

    I always have to write a conditional statement for each combination of values in order to make something like this work. I also have to turn on(true) and off(false) the necessary pages for each condition. Like this:

     

    if (Field("Flux")=="bi-flux" && (Field("Logo")=="a"))
    {
    FusionPro.Composition.SetBodyPageUsage("Corps 1", false);
    FusionPro.Composition.SetBodyPageUsage("Corps 2", false);
    FusionPro.Composition.SetBodyPageUsage("Corps 3", false);
    FusionPro.Composition.SetBodyPageUsage("Corps 4", false);
    FusionPro.Composition.SetBodyPageUsage("Corps 5", true);
    FusionPro.Composition.SetBodyPageUsage("Corps 6", false);
    FusionPro.Composition.SetBodyPageUsage("Corps 7", true);
    FusionPro.Composition.SetBodyPageUsage("Corps 8", false);
    }

     

    For each additional condition, use "else if". The problem with this is that the rule gets really long if you have a lot of conditions.

     

    I'm sure there's a simpler way to do this but I haven't figured it out yet. Good Luck!

×
×
  • Create New...