Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Posts
    43
    Plugin Contributions
    0

    Default Change path of buy now button code?

    I have this custom button code on my featured products module inspired from this post:
    http://www.zen-cart.com/forum/showthread.php?t=105757

    Code:
    $lc_button2= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($featured_products->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $featured_products->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($featured_products->fields['products_id'])) . '" maxlength="6" size="1" /><br />' . zen_draw_hidden_field('products_id', $featured_products->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
    I only have the featured products module visible on my front page (index) to keep things simple.

    I'm simply trying to determine how to redirect the user back to the home page instead of to the product info page (this is what the code does now).

    By altering this code:
    zen_href_link(zen_get_info_page($featured_products->fields['products_id']),

    I've gotten these results:

    zen_href_link(FILENAME_DEFINE_MAIN_PAGE, - page not found
    zen_href_link(FILENAME_DEFAULT, - goes to category page
    zen_href_link(FILENAME_FEATURED, - page not found
    zen_href_link(FILENAME_FEATURED_PRODUCTS, - takes them to featured products page
    zen_href_link(FILENAME_PRODUCTS_ALL, - takes them to the all products page

    But I can't find a code in filenames.php that will just send the user back to the home page (index.php). Any ideas on what I can put in here to get this effect? Do I need to define a new link/page in filenames.php?

    Any suggestions greatly appreciated.

  2. #2
    Join Date
    Jun 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Change path of buy now button code?

    All that I need is the button code path to lead back to index.php, and I'm only using the featured products module on the index page. I can't figure out how to do this one thing that seems so simple.

    Is there something else I need to put in this post to make it more clear?

    Here is the link to the home page of my test site:
    http://www.sarasotafarms.org/biz

    Somebody lend me a hand here - this is the last big step before I can get my cart up (theoretically).

 

 

Similar Threads

  1. How do I change my [Buy Now] button link?
    By perrydesigns in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Feb 2011, 09:47 PM
  2. Change the Add to Cart button to Buy Now button
    By dastudio in forum Customization from the Admin
    Replies: 1
    Last Post: 24 Nov 2010, 09:44 PM
  3. Change Buy Now Button to More Info on Product Listing Page
    By prosam in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Jul 2008, 02:21 PM
  4. Change text for "Buy now" button
    By kpax in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Oct 2007, 10:33 AM
  5. How do I change the Buy Now to a Radio Button
    By RobVox in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 15 Jun 2007, 08:54 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