Page 57 of 73 FirstFirst ... 747555657585967 ... LastLast
Results 561 to 570 of 725
  1. #561
    Join Date
    Jul 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    Hello,

    I just want to say thank you for this wonderful add on and forum. After only one dummy attack (it usually takes a few) it’s installed and works beautifully! Just what I’ve needed for a long time.

    Thanks so much!
    Renee`

  2. #562
    Join Date
    Aug 2006
    Posts
    134
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    In Admin it says that the truncating of the description is done in the css.
    I've tried to locate where that is done and cannot seem to find it.
    Does anyone know which lines in which css file control this.

    Thanks

  3. #563
    Join Date
    Dec 2013
    Posts
    17
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    So I'm trying to get my medium images to show up in the price list. My mediums are stored in images/medium/*category*. Medium images also have "_MED" after the image name.
    For example: thumbnail = /images/category/image.jpg
    medium = /images/medium/category/image_MED.jpg

    I managed to get the image directory changed to images/medium by changing line 646 of header_php.php to:
    Code:
    $prodRow .= zen_image(DIR_WS_IMAGES . 'medium/' . $cats[$cat_index][$prod_index]['products_image'], '', PL_IMAGE_PRODUCT_WIDTH, PL_IMAGE_PRODUCT_HEIGHT, 'class="imgPL"');
    The code i added is in red.

    However now I'm stuck. I'm not sure how to append _MED to the end of 'products_image'. Something is going on with an array there, and i couldnt find its origin. can you tell im no php expert?

    If anyone can point me in the right direction, that'd be awesome.

  4. #564
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Printable Price list :: support thread

    From the top of my head I think "DIR_WS_IMAGES . 'medium/' . $cats[$cat_index][$prod_index]['products_image']" outputs the full path to the image including the filename and extension. To change filenames like "image.jpg" to "image_MED.jpg" you could use the PHP pathinfo() function to separate the (path and) filename and it's extension and then concatenate (glue) it all together again with the _MED in between. On the other hand there might be a Zen Cart function that gets the _MED image for you automatically, if that's the case I guess that would be a smarter approach to handle this.

  5. #565
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Printable Price list :: support thread

    Quote Originally Posted by goldenstone View Post
    Hello,

    I just want to say thank you for this wonderful add on and forum. After only one dummy attack (it usually takes a few) it’s installed and works beautifully! Just what I’ve needed for a long time.

    Thanks so much!
    Renee`
    Bit of an old post, I know, but good to see this add on is still being used and appreciated!
    (although I can't look at the code now without heavy blushing...)

  6. #566
    Join Date
    Dec 2013
    Posts
    17
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    Quote Originally Posted by paulm View Post
    From the top of my head I think "DIR_WS_IMAGES . 'medium/' . $cats[$cat_index][$prod_index]['products_image']" outputs the full path to the image including the filename and extension. To change filenames like "image.jpg" to "image_MED.jpg" you could use the PHP pathinfo() function to separate the (path and) filename and it's extension and then concatenate (glue) it all together again with the _MED in between. On the other hand there might be a Zen Cart function that gets the _MED image for you automatically, if that's the case I guess that would be a smarter approach to handle this.
    Awesome tip! i got it to work with pathinfo(). I'll post my code below.
    This is pretty much my first time coding in php, so if someone can improve this, please do!
    I couldn't get the extension function of pathinfo() to work, but since all of my images are .jpg, its not really an issue. When i tried to concatenate the variable i had set up for extensions, it removed "medium/" from my $dir. Im not sure why...

    Code:
    if(PL_SHOW_IMAGE == 'true'){
    	  
    	  //parse out path
    	  $pathparts = pathinfo((DIR_WS_IMAGES . 'medium/' . $cats[$cat_index][$prod_index]['products_image']));
    	  //to vars
    	  $dir = $pathparts['dirname'];
    	  $file = $pathparts['filename'];
    	  //go go power rangers
            $prodRow .= zen_image($dir . '/' . $file . '_MED' . '.jpg', '', PL_IMAGE_PRODUCT_WIDTH, PL_IMAGE_PRODUCT_HEIGHT, 'class="imgPL"');
          }

  7. #567
    Join Date
    Dec 2013
    Posts
    17
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    One more question, if anyone feels like answering:

    I'm trying to get the products_url row from the products_descriptions table to show up in the "manufacturer" box (because the manufacturer field doesnt matter to me in this case)

    I think i need to edit this section:

    PHP Code:
    // get manufacturer_name
    $manufacturers_name = array();
    if (
    PL_SHOW_MANUFACTURER == 'true')
    {
      
    $sql "SELECT m.manufacturers_id, m.manufacturers_name FROM " TABLE_MANUFACTURERS " m, " TABLE_PRODUCTS " p WHERE m.manufacturers_id = p.manufacturers_id";
      
    //$result = mysql_query($sql, $db->link) or die(mysql_error());
      
    $result $db->Execute($sql);
      
    /*
      while ($row = mysql_fetch_array($result)) {
          $manufacturers_name[$row['manufacturers_id']] = $row['manufacturers_name'];
      }
      mysql_free_result($result);
      */
      
    while (!$result->EOF) {
        
    $manufacturers_name[$result->fields['manufacturers_id']] = $result->fields['manufacturers_name'];
        
    $result->MoveNext(); 
      } 
    And possibly

    PHP Code:
    if (PL_SHOW_MANUFACTURER == 'true') {
            
    $prodRow .= '<td class="manPL"><div>' $manufacturers_name[$cats[$cat_index][$prod_index]['manufacturers_id']] . '&nbsp;</div></td>' "\n";
        } 
    But im not sure how to go about it. Can anyone point me in the right direction?

  8. #568
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Printable Price list :: support thread

    I would leave the first section alone, and try the following hack on the second:
    if (PL_SHOW_MANUFACTURER == 'true') {
    $prodRow .= '<td class="manPL"><div>' . '<a href="' . zen_href_link(zen_get_info_page($cats[$cat_index][$prod_index]['products_id']), 'products_id=' . $cats[$cat_index][$prod_index]['products_id']) . '"> ' . MORE_INFO_TEXT . '</a>' . '&nbsp;</div></td>' . "\n";
    }
    And document the changes...
    Last edited by paulm; 29 Sep 2014 at 10:57 PM.

  9. #569
    Join Date
    Dec 2013
    Posts
    17
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    Quote Originally Posted by paulm View Post
    I would leave the first section alone, and try the following hack on the second:
    And document the changes...
    Thanks for the input again! Im actually looking to display the products_url database field from the database products_description, which actually doesn't contain the URL. We use it to hold our bin numbers for picking certain items in the warehouse.

    I couldn't figure out how to get the code to grab a different database field.

  10. #570
    Join Date
    Sep 2010
    Posts
    612
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    Does anyone have this up and running on v1.5.3? I've installed everything but am getting this error:

    PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /hsphere/local/.../includes/modules/pages/pricelist/header_php.php on line 185
    In trying to fix it I'm finding that the command is a depreciated value but I'm not sure how to update it. Everything I've tried has failed. Any ideas? Thank you.

 

 
Page 57 of 73 FirstFirst ... 747555657585967 ... LastLast

Similar Threads

  1. Printable Price List by Paulm
    By helshop in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 25 Jan 2007, 12:27 PM
  2. printable price list
    By sparxs in forum All Other Contributions/Addons
    Replies: 26
    Last Post: 1 Nov 2006, 03:18 PM
  3. printable price list
    By Alik in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Sep 2006, 03:35 PM

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