Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jul 2007
    Posts
    33
    Plugin Contributions
    0

    Default Product Attributes helper

    My client has a variety of product variants and we want to explain them so customers can make an informed choice.

    For example their log beds come in natural, aspen, hand peeled and skip peeled styles.

    We already have a page explaining the differences and showing little thumbnails but we would like to either show these off on each page where the customer would be shopping or better yet give them a link to a little popup type chart explaining it.

    Either solution..a link back to the page or a link to the popup would need to be available on each page so I'm looking for recommendations and directions on what to edit and where it is.

    Thanks
    Brett

    www.lincolnlogsfurniture/shop/

  2. #2
    Join Date
    Sep 2006
    Location
    Colorado Springs CO USA
    Posts
    516
    Plugin Contributions
    2

    Default Re: Product Attributes helper

    A quick solution would be to simply put target="_whole" in the existing link ( I assume you already have a link from the Zencart product page to the "page explaining the difference".)

    In otherwords, add target="_whole" to the code like this:

    <a href="http://lincolnlogsfurniture/[yourpage]" target="_whole">more info</a>.

    The _whole target assures that when the user clicks the link that it opens in a whole new window. When the window is later closed, the ZenCart is page is still displayed from underneath
    .
    If you want to do it in a true popup window, there are many references to creating popups in java. Just do a Google on popup scripts or popup java. They are fairly easy to add to your zencart product pages. In either case, a link back to your product page is not really necessary as the product page remains in the background until the viewer closes the new window.

    Ron
    www.aspenshopsonline.com - ZenCart 1.3.9h
    www.wilkssupply.com - ZenCart 1.3.9h
    www.un-du.net - ZenCart 1.3.8a

  3. #3
    Join Date
    Jul 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: Product Attributes helper

    What php files would I need to add the link to to get it to show with each product?

    No I dont have a link yet....

    It would be better if it came up as a small boarderless window..like a popup but sized smaller as it will be like a chart.

  4. #4
    Join Date
    Jul 2007
    Posts
    33
    Plugin Contributions
    0

    Default Re: Product Attributes helper

    I've been giving this some thought and my favorite soultion would be a row of thumbnails with small text underneath and mouse overs which explain the item.

    I know its more complicated but more stylish too.

    If it gets too mess y I'll go another way.

    Things I think I'd need to know.

    1.Where would the code need to go to show up on each product page

    2. code for writting mouse overs and the location where this code would be if not in the same location as the products.

    Thanks

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,691
    Plugin Contributions
    11

    Default Re: Product Attributes helper

    You can simply change your dropdown attributes to a selection from an image. http://www.gomagnetic.com/index.php?...roducts_id=119 is an example of how. Don't forget that you need to have a "For Display Only" Default item so the customer has to select the option they want.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  6. #6
    Join Date
    Sep 2006
    Location
    Colorado Springs CO USA
    Posts
    516
    Plugin Contributions
    2

    Default Re: Product Attributes helper

    to DBLTOE:
    Wow, that's some heavy duty use of attributes! Great job! Anyone who wants to the see the real power of this Zencart feature, check his website in post #5
    www.aspenshopsonline.com - ZenCart 1.3.9h
    www.wilkssupply.com - ZenCart 1.3.9h
    www.un-du.net - ZenCart 1.3.8a

  7. #7
    Join Date
    Apr 2005
    Posts
    55
    Plugin Contributions
    0

    Default Re: Product Attributes helper

    Thats a great site dbltoe,

    You have created a popup on your anklet size (guidelines) that is exactly what I am trying to create.

    There is the line of text that you can add in admin attributes, but being new to this I hoped you would expand the method of how it was done to add a link like yours ?

    Really appreciate your help in advance.

  8. #8
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,691
    Plugin Contributions
    11

    Default Re: Product Attributes helper

    Can't take credit for that portion. Most of the backend work was done by haredo (Mark). It was his first site and I prodded, he researched.

    I guess we need to publish that as a mod.

    When the product is displayed, it uses the tpl_product_info_display.php to display the product. If you have attributes with the item, the tpl_modules_attributes.php file is called.

    You put an if in the tpl for attributes, use JavaScript to pop-up the window, add some files to the extra-datafiles folder, add a couple of folders with some files, (THEN A MIRACLE HAPPENS), and you're done!

    The code in the tpl_modules_attributes.php looks like
    PHP Code:
    <div id="productAttributes">
    <?php if ($zv_display_select_option 0) { ?>
    <h3 id="attribsOptionsText"><?php echo TEXT_PRODUCT_OPTIONS?></h3>
    <?php // show please select unless all are readonly ?>

    <?php
        
    for($i=0;$i<sizeof($options_name);$i++) {
    ?>
    <?php
      
    if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    ?>
    <h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3>
    <?php
      
    }

    if (
    preg_match("/anklet/i"$options_name[$i])) 
    {
      
    $guideLink '<a href="javascript:popupWindowPrice(\'' zen_href_link(FILENAME_POPUP_ASZLNGTH) . '\')">(<u>Guidelines</u>)</a>';
      
    }
    else
      
    $guideLink null;
    ?>
    The file popup_aszlnth_filenames.php goes in the /includes/extra_datafiles folder and looks like
    PHP Code:
    <?php
    // ASZLNGTH Filename Define
     
    define('FILENAME_POPUP_ASZLNGTH''popup_aszlngth');
    ?>
    A folder called popup_aszlngth goes under includes/modules/pages and contains the files header_php.php
    PHP Code:
    <?php
    /**
     * Pop up attribute help
     *
     */
    $_SESSION['navigation']->remove_current_page();

    require(
    DIR_WS_MODULES zen_get_module_directory('require_languages.php'));
    ?>
    along with the header_php.php file, there needs to be a jscript_main.php file that looks like
    PHP Code:
    <?php
    // window resizing for aszlngth
    ?>
    <script language="javascript" type="text/javascript"><!--
    var i=0;
    function resize() {
      if (navigator.appName == 'Netscape') i=40;
      if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
      self.focus();
    }
    //--></script>
    There also needs to be a folder named pop-up_azlngth in the custom template folder (includes/templates/gomag/popup_aszlngth) that contains the tpl_main_page.php file which looks like
    PHP Code:
    <?php
    /**
     * tpl_main_page.php
     *
     * Main page to display the aszlngth pop-up data
     */
    ?>
    <body id="popupASZLNGTH">
    <h1><?php echo HEADING_ASZLNGTH ?></h1>
      <div id="ankletSize"><?php echo TEXT_ASZLNGTH1 ?></div>
      <div><?php echo TEXT_ASZLNGTH2 ?></div>
      <div><?php echo '<a href="javascript:window.close()">' TEXT_CLOSE_ASZLNGTH_WINDOW '</a>'?></div>
    </body>
    There may be something I've left out and I'll get Mark to review.
    This whole "magic" is loosely based on the existing cvv pop-up.

    As I always say to Mark, "Necessity is NOT the Mother of invention; laziness IS!" Or, as a friend of mine would say, "We RESEARCHED the cvv pop-up."
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  9. #9
    Join Date
    Apr 2005
    Posts
    55
    Plugin Contributions
    0

    Default Re: Product Attributes helper

    Thank you so much for taking the time to explain this, I will get on with this right away.

    Superb Mod !

  10. #10
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,691
    Plugin Contributions
    11

    Default Re: Product Attributes helper

    Keep in mind that I'm old and have a bad case of CRS.

    Use this only on a test site till I confirm it all.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Search Helper Support Thread
    By swguy in forum All Other Contributions/Addons
    Replies: 18
    Last Post: 9 Nov 2011, 11:14 AM
  2. Helper Program
    By tidy in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 22 Apr 2009, 02:17 AM
  3. Need PHP code hack helper for make news products of month.
    By explorer1979 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Oct 2008, 04:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg