Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Styling the Special Product Listing

    Hi I am trying to style the special product listing so it has box and background image with specials etc. I have it set to display 3 special products per row but since adding the border, it seems to push the third product onto a third line, I know this is an automatic setting it has set at 33%. looked up thread and found that if I change the following in special_index.php it might solve it but no

    SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS == 0 ) {
    $col_width = floor(100/$num_products_count)-3;
    } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS)-3;
    }

    I added the following to the css:

    .specialsListBoxContents {
    border-left:1px solid #2c130f;

    border-bottom:1px solid #2c130f;
    border-top:1px solid #2c130f;
    padding-top:3px;
    background-image : url(../images/offer.png);
    background-repeat : no-repeat;
    position:top;

    }

    and this is what I get

    but cannot get space between boxes and if I put in right border it throws it off and only allows 2 on one line and the third box on another. Any ideas how this can be made more presentable. thanks.

  2. #2
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: Styling the Special Product Listing

    Have you tried a higher value than 3? Maybe 5, or 6?

    With -3

    if you change the padding-left from 0.3em to 0.1em in
    .centerColumn

    and you change the padding-top: 3px; to padding: 3px 0 0 0;
    it'll let you add the border-right

  3. #3
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Re: Styling the Special Product Listing

    Hi thank you for that the padding on centercolumn worked but still not space between columns. So I am trying to this probably going around it the wrong way though. In the CSS, i have placed:
    #specialswrapper, .specialsListBoxContents{

    border-left:1px solid #2c130f;
    border-right:1px solid #2c130f;
    border-bottom:1px solid #2c130f;
    border-top:1px solid #2c130f;
    padding:3px 0 0 0;
    background-image : url(../images/offer.png);
    background-repeat : no-repeat;
    position:top;
    float: left;
    position: relative;
    z-index:4;
    }

    .specialsListBoxContents {

    float: left;
    position: relative;
    z-index:4;

    }

    #ribbon {
    background:url(../images/slider/ribbon.png) no-repeat;
    width:140px;
    height:135px;
    position:absolute;
    top:-12px;
    left:-15px;
    z-index:600;
    }


    a img {

    margin-top:27px;
    background-color:transparent;
    }

    and in the tpl_modules_specials_default.php added this

    <!-- bof: specials -->
    <?php if ($zc_show_specials == true) { ?>

    <div class="centerBoxWrapper" id="specialsDefault">

    <div id="specialswrapper">
    <div id="ribbon"></div>

    <?php
    /**
    * require the columnar_display template to show the products
    */
    require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
    ?>


    </div>
    </div>
    <?php } ?>
    <!-- eof: specials -->

    Trying to achieve something similar to this link and think it is best achieved through divs and the CSS. Hopefully you can shed some light to error of my ways. thanks

  4. #4
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: Styling the Special Product Listing

    Quote Originally Posted by jagall View Post
    Hi thank you for that the padding on centercolumn worked but still not space between columns.
    Have you tried to change the -3?

    SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS == 0 ) {
    $col_width = floor(100/$num_products_count)-6;
    } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS)-6;
    }

    You could also try the SNAF add-on?
    http://www.zen-cart.com/downloads.php?do=file&id=1358

  5. #5
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Re: Styling the Special Product Listing

    yes I did change to -6 and no difference at all but my codes looks slightly different?

    // show only when 1 or more
    if ($num_products_count > 0) {
    if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS == 0 ) {
    $col_width = floor(100/$num_products_count)-6;
    } else {
    $col_width = floor(100/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS)-6;
    }

  6. #6
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: Styling the Special Product Listing

    Quote Originally Posted by jagall View Post
    yes I did change to -6 and no difference at all but my codes looks slightly different?
    I copied it from your first post!
    Anyhow try this

    $col_width = floor(90/$num_products_count);
    } else {
    $col_width = floor(90/SHOW_PRODUCT_INFO_COLUMNS_SPECIALS_PRODUCTS)

    and add to .specialsListBoxContents
    margin-right: 5px !important;

  7. #7
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Re: Styling the Special Product Listing

    Thank you Keneso, I tried exactly what you said but it hasn't changed anything really. I have been looking at the SNAF thread and posted there as I have the column grid layout installed so that module is an update on that but not sure if I need to install it to achieve what I am trying to do, ahhh wish I was better at css. Cheers for your all your help.

  8. #8
    Join Date
    May 2009
    Posts
    1,254
    Plugin Contributions
    3

    Default Re: Styling the Special Product Listing

    You're welcome, sorry I couldn't do more, Niccol is far more expert than I am, and very kind I may add, you'll be fine at the SNAF support.

  9. #9
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Re: Styling the Special Product Listing

    Cheers I'll post the solution if I get to it.

  10. #10
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Re: Styling the Special Product Listing

    Hi Guys,

    I am back on about this, I am trying to change the specials to appear something like this:
    Name:  specials.jpg
Views: 469
Size:  42.6 KB

    Niccol advised me to place the following code in the product_listing.php:

    $list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => '<div class="innerColumn">'.$lc_text.'</div>');

    But not sure where to go from here, I have altered the CSS alright but I am not getting the ribbon to appear on each of the specialsListBoxContents, I can get it wrap the entire centre box which is no good, so any help here would be greatly appreciated. Cheers.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Product Listing page , need help with styling
    By BuRocKNRoLL in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Jan 2012, 12:25 PM
  2. How to truncate the product name of the special listing in centercolummn?
    By blueflu in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Jul 2011, 06:34 PM
  3. Product listing table css styling
    By bigmo337 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Jun 2010, 09:53 AM
  4. how to add freeshipping listing as new product listing and special listing
    By zeme_09g in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 15 Apr 2010, 10:35 AM
  5. Product listing styling and footer display
    By JackA in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Dec 2007, 05:16 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