Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Change path of buy now button code?

Change path of buy now button code?

Locked

Views: 815

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
22 Jul 2009, 12:49 AM
#1
andrew55 avatar

andrew55

New Zenner

Join Date:
Jun 2009
Posts:
43
Plugin Contributions:
0

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

$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.

23 Jul 2009, 3:34 AM
#2
andrew55 avatar

andrew55

New Zenner

Join Date:
Jun 2009
Posts:
43
Plugin Contributions:
0

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). :smile: