Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2011
    Posts
    1
    Plugin Contributions
    0

    Default zen_image_submit

    Hi. Hoping someone can help. I'm working on updating a checkout in zen. Having a problem with adding an a class css to a php echo string for the zen_image_submit buttons. It works fine for zen_image_button. Anyone encountered this and know how to make it work. I'm using the slidingdoor technique with the css but its not picking up the seperate span class image.

  2. #2
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: zen_image_submit

    Are you trying to pass the class as a parameter? In that case the problem is that the zen_image_submit function ignores the parameters when using the Zen Cart CSS buttons...

    Maybe using the secondary class feature solves your problem. That's an optional fourth parameter.

    ( function zen_image_submit($image, $alt = '', $parameters = '', $sec_class = ''))

  3. #3
    Join Date
    Oct 2008
    Posts
    20
    Plugin Contributions
    0

    Default Re: zen_image_submit

    This is an example of a mod I made to tpl_product_info_display.php to add a class:

    Code:
    zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT, 'class="imagealign"');
    Hope it helps.
    Phil

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,878
    Plugin Contributions
    96

    Default Re: zen_image_submit

    As paulm said, the zen_image_submit and zen_image_button functions don't pass the parameters on to the zenCssButton function but they do pass on the sec_class (secondary class) parameter. To get an additional class added to a button, you need to make the call as:

    Code:
    zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT, '', 'my_new_class');
    Note also that the zenCssButton function creates a <span></span> structure for calls from zen_image_button, but creates an <input type="submit" /> structure for calls from zen_image_submit.

  5. #5
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: zen_image_submit

    Also note that not passing the parameters is actually an old bug (reported but ignored).

    @lat9: I think zen_image_button does pass the parameters. I haven't tested this recently, so I might be wrong, but davehandley33 post confirms it's passing the parameters.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,878
    Plugin Contributions
    96

    Default Re: zen_image_submit

    Quote Originally Posted by paulm View Post
    Also note that not passing the parameters is actually an old bug (reported but ignored).

    @lat9: I think zen_image_button does pass the parameters. I haven't tested this recently, so I might be wrong, but davehandley33 post confirms it's passing the parameters.
    paulm, you're correct; zen_image_button *does* pass the parameters on to zenCssButton, but zen_image_submit does not.

  7. #7
    Join Date
    Jan 2014
    Location
    Wairarapa
    Posts
    6
    Plugin Contributions
    0

    Default Re: zen_image_submit

    I'm working on a legacy system (v1.38) at present and have found that the Xsell feature produces a duplicate ID on the page for both the add to baskets of the product and the cross-sell product - "image_submit". Not entirely sure how I can rename this latter (xsell) to avoid this issue and not screw up everything else?

    // add add_to_cart button
    $add_to_cart_text = '<form name="cart_quantity" action="index.php?main_page=product_info&amp;products_id=' . (int)$xsell_query->fields['products_id'] . '&amp;action=add_product" method="post" enctype="multipart/form-data">
    <input type="hidden" name="cart_quantity" value="1" /><input type="hidden" name="products_id" value="' . (int)$xsell_query->fields['products_id'] . '" />';
    $add_to_cart_button = zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT, "style=\"padding: 0px;\"");
    $display_add_to_cart_button = zen_get_buy_now_button($xsell_query->fields['products_id'], $add_to_cart_button);
    $add_to_cart_text .= $display_add_to_cart_button . '</form>';

 

 

Similar Threads

  1. tpl_search.php 'zen_image_submit' missing ?
    By refriend in forum Bug Reports
    Replies: 1
    Last Post: 7 Aug 2007, 08:26 AM

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