Page 27 of 123 FirstFirst ... 1725262728293777 ... LastLast
Results 261 to 270 of 1224
  1. #261
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,108
    Plugin Contributions
    11

    Default Re: ZCA Bootstrap Template

    The docs can be your friend. Searching for home found https://docs.zen-cart.com/user/new_u...ome_in_middle/

  2. #262
    Join Date
    Oct 2020
    Location
    South Yorkshire, UK.
    Posts
    28
    Plugin Contributions
    0

    Default Re: ZCA Bootstrap Template

    Thank you dbltoe have spent hours over the last few days reading through the docs and missed that somehow, its so long since have used Zencart and had a shopping cart that am lost as it was V1.3.9 when last had one so am a bit lost right now

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

    Default Re: ZCA Bootstrap Template

    Looking to customize some of the buttons, i.e. the "previous" "product listing" "next" ones when viewing a product.
    Spent lots of time searching for the snip where to add the class, but can't seem to find it.

    Appreciate if someone can suggest the file that outputs the following:

    <button type="button" class="btn button_prev button_prev">
    <button type="button" class="btn button_return_to_product_list button_return_to_product_list">
    <button type="button" class="btn button_next button_next">

    Which btw repeats the "button_prev", "button_return_to_product_list", and "button_next".

    And eventually how to add the extra class.

    Thank you

  4. #264
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,669
    Plugin Contributions
    9

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by keneso View Post
    Looking to customize some of the buttons, i.e. the "previous" "product listing" "next" ones when viewing a product.
    Spent lots of time searching for the snip where to add the class, but can't seem to find it.

    Appreciate if someone can suggest the file that outputs the following:

    <button type="button" class="btn button_prev button_prev">
    <button type="button" class="btn button_return_to_product_list button_return_to_product_list">
    <button type="button" class="btn button_next button_next">

    Which btw repeats the "button_prev", "button_return_to_product_list", and "button_next".

    And eventually how to add the extra class.

    Thank you
    includes/templates/bootstrap/templates/tpl_products_next_previous.php

    line 42:
    Code:
    <a class="p-1" href="<?php echo zen_href_link(FILENAME_DEFAULT, "cPath=$cPath"); ?>"><?php echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LIST, BUTTON_RETURN_TO_PROD_LIST_ALT); ?></a>
    add extra class parm to the zen_image_button function.

    you also have to go outside of the template and look here:

    includes/modules/product_prev_next.php
    Last edited by carlwhat; 10 Nov 2020 at 04:18 PM.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #265
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: ZCA Bootstrap Template

    Thank you.
    Actually to customize it I could use the button_prev class generated, I would like to know how to add the extra param in the files (snip of code) you suggested.

  6. #266
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,669
    Plugin Contributions
    9

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by keneso View Post
    Thank you.
    Actually to customize it I could use the button_prev class generated, I would like to know how to add the extra param in the files (snip of code) you suggested.
    apparently you can not add an additional class element like so:

    PHP Code:
    echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LISTBUTTON_RETURN_TO_PROD_LIST_ALT'class="myNewClass"'); 
    that class gets filtered out. you can do:

    PHP Code:
    echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LISTBUTTON_RETURN_TO_PROD_LIST_ALT'crap="myNewClass"'); 
    that crap does not get filtered out; but it provides no help to what you want to do...

    in looking at the code, i would build an observer. since you are using bootstrap, i would go on the assumption that IMAGE_USE_CSS_BUTTONS is set to 'yes'. if so, i would look to build an observer that hits this event in functions/html_output.php:

    PHP Code:
    if ($type=='button') {
          
    // link button
          // -----
          // Give an observer the chance to provide alternate formatting for the button (it's set to an empty string
          // above).  If the value is still empty after the notification, create the standard-format
          // of the button.
          //
          
    $GLOBALS['zco_notifier']->notify(
                
    'NOTIFY_ZEN_CSS_BUTTON_BUTTON',
                array(
                    
    'button_name' => $button_name,
                    
    'text' => $text,
                    
    'sec_class' => $sec_class,
                    
    'parameters' => $parameters,
                ),
                
    $css_button
          
    ); 
    adding a class to a ZC generated button seems like a lot of work!

    here is info on building an observer class:

    https://docs.zen-cart.com/dev/code/notifiers/

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #267
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: ZCA Bootstrap Template

    Since you're customizing this unique for your template, you could just skip the use of the zen_image_button function and put your own HTML code in its place.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #268
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: ZCA Bootstrap Template

    Thank you both.

    @carlwhat
    I'll try to learn, in the meantime I'll use the class generated

    @DrByte
    Yes, I did think about it as well, but being at the beginning of a new customization I thought to try to learn a different approach in case needed for more.

    @both + rbarbour
    However I am puzzled by the double output of "button_prev" class, is it a bug, is it on purpose for reasons beyond my comprehension and knowledge?

  9. #269
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: ZCA Bootstrap Template

    I believe the duplication may be a bug. Harmless though.

    It's always best to try to style the provided classes if possible (in your own self-added stylesheet), rather than adding more classes to the template.

    That said, if you wanted to add your own style, carlwhat was nearly correct when proposing adding a 3rd parameter: it should have been the 4th parameter instead, and be only the name of the class you wanted to add.
    eg:
    Code:
    echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LIST, BUTTON_RETURN_TO_PROD_LIST_ALT, '', 'myNewClass');
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #270
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,669
    Plugin Contributions
    9

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by DrByte View Post
    I believe the duplication may be a bug. Harmless though.

    It's always best to try to style the provided classes if possible (in your own self-added stylesheet), rather than adding more classes to the template.

    That said, if you wanted to add your own style, carlwhat was nearly correct when proposing adding a 3rd parameter: it should have been the 4th parameter instead, and be only the name of the class you wanted to add.
    eg:
    Code:
    echo zen_image_button(BUTTON_IMAGE_RETURN_TO_PROD_LIST, BUTTON_RETURN_TO_PROD_LIST_ALT, '', 'myNewClass');
    holy shismoly! how did i miss that!

    apologies.

    drByte is correct. adding it to the 4th parameter does indeed add another class.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 27 of 123 FirstFirst ... 1725262728293777 ... LastLast

Similar Threads

  1. v155 Clone a Template [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 94
    Last Post: 16 Mar 2024, 04:13 PM
  2. v150 aBagon Template Support Thread
    By VJef in forum Addon Templates
    Replies: 54
    Last Post: 5 Sep 2020, 08:44 PM
  3. v155 ZCA Bootstrap Template 1.0 (BETA)
    By rbarbour in forum Addon Templates
    Replies: 74
    Last Post: 25 Apr 2018, 07:05 PM
  4. TB Sempre Template Support Thread
    By brandonturpin in forum Addon Templates
    Replies: 48
    Last Post: 19 Mar 2015, 06:33 PM
  5. Wallet Template - Support Thread
    By zami in forum Addon Templates
    Replies: 45
    Last Post: 25 Mar 2010, 10:15 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