Page 6 of 6 FirstFirst ... 456
Results 51 to 53 of 53
  1. #51
    Join Date
    Jan 2013
    Posts
    678
    Plugin Contributions
    0

    Default Re: attribute pricing

    i added it to this line cause i am using lightbox and i just cant get the lightbox popup to display attribute picture. can u spot the error? the 1 in red is the 1 in question i think
    Code:
    <?php /*========================================== LIGHTBOX ==================================*/ ?>
    <div class="back product-main-image__item <?php echo $eftype; ?>">
    <?php // bof Zen Lightbox 2008-12-15 aclarke ?>
    <?php
    if (ZEN_LIGHTBOX_STATUS == 'true') {
      if (ZEN_LIGHTBOX_GALLERY_MODE == 'true' && ZEN_LIGHTBOX_GALLERY_MAIN_IMAGE == 'true') {
        $rel = 'lightbox-g';
      } else {
        $rel = 'lightbox';
      }
    ?>
    
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a rel='.$rel.' href="' . zen_lightbox($products_image_large, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="SBA_ProductImage"') . '">' . zen_image($products_image_large, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="SBA_ProductImage"') . '</a>'; ?>');
    //--></script>
    <?php } else { ?>
    <?php // eof Zen Lightbox 2008-12-15 aclarke ?>
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id'], 'SSL') . '\\\')">' . zen_image(addslashes($products_image_large), addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '</a>'; ?>');
    //--></script>
    <?php // bof Zen Lightbox 2008-12-15 aclarke ?>
    <?php } ?>
    <?php // eof Zen Lightbox 2008-12-15 aclarke ?>
    <noscript>
    <?php
      echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id'], 'SSL') . '" target="_blank">' . zen_image($products_image_large, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="SBA_ProductImage"') . '</a>';
    ?>
    </noscript>
    <?php /*==========================================EOF LIGHTBOX ==================================*/ ?>
    Last edited by jimmie; 29 Nov 2019 at 01:55 AM.

  2. #52
    Join Date
    Jul 2012
    Posts
    14,576
    Plugin Contributions
    17

    Default Re: attribute pricing

    Quote Originally Posted by jimmie View Post
    and what about custom id on product info? isnt it suppose to show?
    Depends on settings and depends on having merged a few notifiers into the attributes.php file associated with the template and that if sba is disabled that the option type was sba select list (dropdown): includes/modules/YOUR_TEMPLATE/attributes.php
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #53
    Join Date
    Jul 2012
    Posts
    14,576
    Plugin Contributions
    17

    Default Re: attribute pricing

    Quote Originally Posted by jimmie View Post
    i added it to this line cause i am using lightbox and i just cant get the lightbox popup to display attribute picture. can u spot the error? the 1 in red is the 1 in question i think
    Code:
    <?php /*========================================== LIGHTBOX ==================================*/ ?>
    <div class="back product-main-image__item <?php echo $eftype; ?>">
    <?php // bof Zen Lightbox 2008-12-15 aclarke ?>
    <?php
    if (ZEN_LIGHTBOX_STATUS == 'true') {
      if (ZEN_LIGHTBOX_GALLERY_MODE == 'true' && ZEN_LIGHTBOX_GALLERY_MAIN_IMAGE == 'true') {
        $rel = 'lightbox-g';
      } else {
        $rel = 'lightbox';
      }
    ?>
    
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a rel='.$rel.' href="' . zen_lightbox($products_image_large, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="SBA_ProductImage"') . '">' . zen_image($products_image_large, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="SBA_ProductImage"') . '</a>'; ?>');
    //--></script>
    <?php } else { ?>
    <?php // eof Zen Lightbox 2008-12-15 aclarke ?>
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id'], 'SSL') . '\\\')">' . zen_image(addslashes($products_image_large), addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '</a>'; ?>');
    //--></script>
    <?php // bof Zen Lightbox 2008-12-15 aclarke ?>
    <?php } ?>
    <?php // eof Zen Lightbox 2008-12-15 aclarke ?>
    <noscript>
    <?php
      echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id'], 'SSL') . '" target="_blank">' . zen_image($products_image_large, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="SBA_ProductImage"') . '</a>';
    ?>
    </noscript>
    <?php /*==========================================EOF LIGHTBOX ==================================*/ ?>
    Unfortunately, it's a little more than just a "quick" fix. I say this because, for the code to identify which image to adjust it looks for an id parameter, unfortunately for html validation only one tag on a page can have that id. So, having it at both the zen_image (which adjusts the image currently displayed) and associated with the text in red (location identifying what image to display when the zoom code is executed) does not validate as the same id would be in two places. So, the parameter would likely need to be changed to a class so that it could be duplicated which would also mean the added javascript would have to be changed to search for a class instead of an id. Or some additional code added in to look for the tag that surrounds the one with the sba related id and update the href in that tag. Might be a little "easier".
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

 

 
Page 6 of 6 FirstFirst ... 456

Similar Threads

  1. v150 Attribute pricing...
    By rainbow_pixie_star in forum Setting Up Categories, Products, Attributes
    Replies: 23
    Last Post: 6 Mar 2014, 10:14 PM
  2. Attribute variables or skip/branch & advanced attribute pricing help
    By tee2020 in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 21 Jun 2011, 02:56 AM
  3. Different Quantity Pricing & Corresponding Attribute Pricing
    By benlau in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 19 Jan 2010, 03:59 PM
  4. Attribute images and/or attribute pricing
    By tryphon in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 6 Apr 2009, 09:38 PM
  5. Attribute Pricing
    By gregoryjameswood in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 23 Apr 2007, 06:56 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR