And Kelly...yes, your site just makes me want to grab a cup of hot chocolate on a snowy evening and browse through.
Unfortunately no snow here in the northeast yet, though maybe tonight!!!
And Kelly...yes, your site just makes me want to grab a cup of hot chocolate on a snowy evening and browse through.
Unfortunately no snow here in the northeast yet, though maybe tonight!!!
Hello, I am kind of new to the whole Zen Cart community. I do know a few things of webdesign etc. I am still working on this site and i have just finished installing the wishlist and it was working perfect using the latest Zencart. I have came on to the site today to test all the functionality of the site and came accross when I am in the wishlist and send a email to a friend with my wishlist content. It sends the email and details perfect also the url link as it should but when i click on the hyperlink to go back to see the wishlist i get PAGE NOT FOUND. I have tried to create a few differnt accounts to test this but it has the same results. The funny thing is it worked last night. Today I logged in and now i get this issue. I have not made any changes today. I have also followed all the tutorials and changes for the new version.
Any suggestions would be greatly appreciated!
www.tinastasteofhome.com and click on the "online Store" link
Thanks in advance!!!
Great mod - seems to be working fine on 1.3.7 using the change on page 2.
Just wanted to add my code for the Add to Cart box on tpl_product_info_display.php as I have it set up so that if not logged in, text will show asking to log in to add this item to Wish List and if logged in then the "add to Wish List" will come up. I know others have posted code to add the Wish List button to products but this way, it will first check if you are logged in and give a more useful solution.
Thought it might be useful for other people too. :)
Code:<!--bof Add to Cart Box --> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?> <?php $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : ''); if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) { // hide the quantity box and default to 1 $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT); } else { // show the quantity box $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT); } $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button); ?> <?php if ($display_qty != '' or $display_button != '') { ?> <div id="cartAdd"> <?php echo $display_qty; echo $display_button; ?> <br clear=all><br><center> <?php // (un): start wishlist link if ( $_SESSION['customer_id'] ) { echo '<a href="' . zen_href_link(UN_FILENAME_WISHLIST, zen_get_all_get_params(array('action', 'products_id')) . 'products_id='.(int)$_GET['products_id'].'&action=un_add_wishlist') . '">' . UN_TEXT_ADD_WISHLIST . '</a>'; } else { $_SESSION['navigation']->set_snapshot(); echo 'please <a href=http://www.redinstead.com.au/index.php?main_page=login>log in</a><br />to add this to<br />your Wish List'; } // (un): end wishlist link ?> </center> </div> <?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box-->
Last edited by JenRed; 9 Feb 2007 at 07:07 AM.
SORRY! That code I posted above has a direct link to my site in there. I have reposted it below.
I should add, to the above: Having it set up this way, I have turned off the Wish List Sidebox as it is no longer needed.
Code:<!--bof Add to Cart Box --> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?> <?php $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : ''); if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) { // hide the quantity box and default to 1 $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT); } else { // show the quantity box $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT); } $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button); ?> <?php if ($display_qty != '' or $display_button != '') { ?> <div id="cartAdd"> <?php echo $display_qty; echo $display_button; ?> <br clear=all><br><center> <?php // (un): start wishlist link if ( $_SESSION['customer_id'] ) { echo '<a href="' . zen_href_link(UN_FILENAME_WISHLIST, zen_get_all_get_params(array('action', 'products_id')) . 'products_id='.(int)$_GET['products_id'].'&action=un_add_wishlist') . '">' . UN_TEXT_ADD_WISHLIST . '</a>'; } else { $_SESSION['navigation']->set_snapshot(); echo 'please <a href=http://WWW.YOURSITE.COM/index.php?main_page=login>log in</a><br />to add this to<br />your Wish List'; } // (un): end wishlist link ?> </center> </div> <?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box-->
Do anyone know how to add a "back to shopping" or "back" button at the top of the wishlist mainpage? seems like a dead end (no nav button)
dharma, not sure if I hit on what you're asking, but in the includes/templates/YOURTEMPLATE/un_wishlist/tpl_un_wishlist_s.php file, find this code:
and add this code right after the <div class="buttons"> to have the back button just to the left of the update button. This button takes you back to your home page:Code:<?php if ($listing_split->number_of_rows > 0) { ?> <div class="buttons"> <?php echo zen_image_submit(UN_BUTTON_IMAGE_SAVE, UN_BUTTON_SAVE_ALT); ?></div>
So the full code looks like this:Code:<?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?>
See attached screenshot. Hope it helps, works for me...Code:<?php if ($listing_split->number_of_rows > 0) { ?> <div class="buttons"> <?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?> <?php echo zen_image_submit(UN_BUTTON_IMAGE_SAVE, UN_BUTTON_SAVE_ALT); ?></div>
I am using JenRed's code (thank you!) from above (no sidebox) is there some sort of "if" statement that can be added in order for "add to wishlist" to not display if out of stock? (I must delete out of stock items after a week, so they disappear off wishlist too)
ps. Thank You tcustomgolf for the button nav code!PHP Code:
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
<br clear=all><br><center>
<?php
// (un): start wishlist link
if ( $_SESSION['customer_id'] ) {
echo '<a href="' . zen_href_link(UN_FILENAME_WISHLIST, zen_get_all_get_params(array('action', 'products_id')) . 'products_id='.(int)$_GET['products_id'].'&action=un_add_wishlist') . '">' . UN_TEXT_ADD_WISHLIST . '</a>';
} else {
$_SESSION['navigation']->set_snapshot();
echo 'please <a href=http://WWW.YOURSITE.COM/index.php?main_page=login>log in</a><br />to add this to<br />your Wish List';
}
// (un): end wishlist link
?>
</center>
</div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->
Hi all, Ive just installed this mod and im getting this error:
1146 Table 'fishkrib_zc1.un_wishlists' doesn't exist
in:
[SELECT id FROM un_wishlists w WHERE w.customers_id=1 and w.default_status=1 ]
Someone mentions it early in this thread but fixes it and doesnt say how, says something about renaming in myphpadmin, so i went to myphpadmin and renamed the tables but still comes up with the same error message.
Any ideas?
And in my admin it comes up with this message:
1146 Table 'fishkrib_zc1.un_wishlists' doesn't exist
in:
[SELECT w.id, w.customers_id, w.created, w.modified, w.name, w.comment, w.default_status, w.public_status, count(p.products_id) as items_count, c.customers_email_address, c.customers_firstname, c.customers_lastname FROM un_wishlists w LEFT JOIN un_products_to_wishlists p2w ON w.id=p2w.un_wishlists_id LEFT JOIN zen_products p ON p2w.products_id=p.products_id LEFT JOIN zen_customers c ON w.customers_id=c.customers_id GROUP BY w.id ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Last edited by troy77; 15 Feb 2007 at 06:36 PM. Reason: needed to add something
Troy...the sql statement that gets loaded from the wishlist mod files does not include a table prefix, so when it is loaded, it loads without the prefix. To fix, you either have to modify the sql statement and include your table prefix and reload, or go into myphpadmin to modify the table as discussed.
The prefix on all my tables is zen_ You can determine yours in myphpadmin, but zencart tables I believe default to this. Add that before any table statement like CREATE TABLE `un_wishlists`. So this will become CREATE TABLE `zen_un_wishlists` in the sql statement, then reload the statement in your zen admin.
myphpadmin is accessed through your hosting cos. cPanel or similar hosting site admin program, and you can modify the table names there also.
If you need help with either, feel free to PM me with a number to call...
A big thank you for that "tcustomgolf" but it now doesnt ad anything to the wishlistand is there a way i can have it as a button in the description instead of a sidebox if i can ever get it to work
![]()
Bookmarks