Page 1 of 10 123 ... LastLast
Results 1 to 10 of 93
  1. #1
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default "Whats New" Scrolling Sidebox

    The old What's New sidebox that automatically changes the product every 5 seconds without refreshing the page has a slight bug... or "under-feature" might be a better term.

    There are multiple product types that come with Zen-cart: Product General, Document, Music, etc. The what's new scrollbox auto assumes your product will be product-general, so if someone clicks that item for more information from the scroller sidebox, it will load that item using the 'Product - General' template, and not the template that the item was actually designed under, so it won't show all the proper fields and data you want.

    I've taken a quick look at the code, but couldn't see initially how to fix it. Can anyone else point me in the right direction. I've also tried contacting the creator, but there has been no response yet.

  2. #2
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: "Whats New" Scrolling Sidebox

    Code:
    href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product->fields['products_id']) . '">
    The problem is in this link, It's using FILENAME_PRODUCT_INFO as the page name, which needs to be changed to adapt to the product type. Any takers?

  3. #3
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: "Whats New" Scrolling Sidebox

    Well I took a look at the default zencart what's new sidebox and see the difference. It's using a zen_get_info_page function. Funny thing is, it doesn't seem to change the behavior.

    //$newsflashes[$i] = '<br /><center><a class="wnImage" href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product->fields['products_id']) . '"><img src="' . DIR_WS_IMAGES . $random_product->fields['products_image']. '" alt="' . $random_product->fields['products_name'] . '" width="' . SMALL_IMAGE_WIDTH . '" height="' . SMALL_IMAGE_HEIGHT . '" style="border:1px outset #000000" onMouseOver="myHint.show(\'TT4\')" onMouseOut="myHint.hide()" />' . '</a><br /><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product->fields['products_id']) . '">' . $random_product->fields['products_name'] . '</a><br />' . $whats_new_price . '</center>';
    replaced with:
    $newsflashes[$i] = '<br /><center><a class="wnImage" href="' . zen_href_link(zen_get_info_page($random_whats_new_sidebox_product->fields['products_id']), 'products_id=' . $random_whats_new_sidebox_product->fields['products_id']) . '"><img src="' . DIR_WS_IMAGES . $random_product->fields['products_image']. '" alt="' . $random_product->fields['products_name'] . '" width="' . SMALL_IMAGE_WIDTH . '" height="' . SMALL_IMAGE_HEIGHT . '" style="border:1px outset #000000" onMouseOver="myHint.show(\'TT4\')" onMouseOut="myHint.hide()" />' . '</a><br /><a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product->fields['products_id']) . '">' . $random_product->fields['products_name'] . '</a><br />' . $whats_new_price . '</center>';
    But it still shows the link as "main_page=product_info" instead of "main_page=product_music_info", and I'm sure the product type is correct.

  4. #4
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: "Whats New" Scrolling Sidebox

    I think the problem may be something im not updating on my custom product type. I will look into it more.

  5. #5
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: "Whats New" Scrolling Sidebox

    My search led me to believe there was a problem in my /includes/modules/pages/product_tabbed_info/main_page_template_vars.php file, but it all appears correctly and points to my template file I made for the tabbed products, yet still, the link is formed with "product_info" instead of "product_tabbed_info"

  6. #6
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: "Whats New" Scrolling Sidebox

    Ok I'm stumped. it links properly from the New Products menu from the categories and when i click on my item, it loads the right page template. I tried the default whats new, and oddly enough, it never even shows that product.. even after refreshing 100 times.. also the New products on the main page doesn't seem to ever show that new product. But the Scrolling whats new shows it.. but with a broken link.

  7. #7
    Join Date
    Jan 2006
    Posts
    72
    Plugin Contributions
    0

    Default Re: "Whats New" Scrolling Sidebox

    Hi all

    can someone supply a .zip for this,
    and can it be uesed for product as it would be good.

    Thanks

    simon

  8. #8
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: "Whats New" Scrolling Sidebox

    zip for what? tabbed product type or the scrolling whats new sidebox?

    The whats' new sidebox is old and it's what I'm trying to fix, the tabbed product type is what Im working on and thats how i found this bug in the scrolling whats new box that hard coded the product_info page. Now that I've updated the file with the new zen method of finding the product page, it seems that the problem is actually a logistics thing. Because of the way the javascript only refreshes the product ID, the rest of the URL stays static. So i think it needs more than just a one line change, it needs to update the product type page as well as the product id

  9. #9
    Join Date
    Feb 2006
    Posts
    588
    Plugin Contributions
    0

    Default Re: "Whats New" Scrolling Sidebox

    Keep us updated how to get this thing to work well with 1.3 and be xtml compliant

  10. #10
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: "Whats New" Scrolling Sidebox

    NEW VERSION!!!

    I fixed it. It was simpler than I thought, once again thanks to Zen-Magic :)
    Updated What's New Scroller Attached!
    Last edited by qhome; 9 Apr 2008 at 03:38 AM.

 

 
Page 1 of 10 123 ... LastLast

Similar Threads

  1. "New products" side box is not scrolling.
    By Ridgh in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 17 Apr 2014, 07:02 PM
  2. Scrolling Whats New Sidebox
    By sn0ut in forum Addon Sideboxes
    Replies: 29
    Last Post: 21 Feb 2010, 09:19 PM
  3. "Best sellers" scrolling sidebox thumbnail problem
    By chris32882 in forum Addon Sideboxes
    Replies: 29
    Last Post: 15 Feb 2009, 12:56 AM
  4. Store "forgets" whats in the basket when pressing "Home"?
    By deanparkr in forum General Questions
    Replies: 1
    Last Post: 7 Dec 2008, 05:55 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