Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Music Samples with Media Manager

    Hi, I've just started offering MP3s for sale on my site and would like to give samples for customers to listen to. I've followed all the steps in the manual using Media Manager and everything seems fine all the way up to assigning the collection to a product. Unlike other threads I've read on this problem, I do get both dropdown boxes and can select the product I want to assign it to, but when I click "Add", it just directs me back to the homepage. When I check Media Manager again, the collection has not been linked to a product. Needless to say, nothing shows up on the product page. Thanks for any clues!

  2. #2
    Join Date
    Oct 2006
    Posts
    625
    Plugin Contributions
    0

    Default Re: Music Samples with Media Manager

    It's a bug in v1.3.9h.

    For solution, see http://www.zen-cart.com/forum/showthread.php?t=168587

  3. #3
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: Music Samples with Media Manager

    Thank you, I was so relieved to see the fix, then when I went to the file indicated
    (/admin/includes/init_includes/init_sessions.php file.
    On line 40 you'll see a line that starts like this)
    Line 40 had nothing like that, in fact there is nothing remotely resembling that content in the whole file. ? any ideas?

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,886
    Plugin Contributions
    6

    Default Re: Music Samples with Media Manager

    Line 40 reads:
    Code:
      if (strpos ( $PHP_SELF, FILENAME_PRODUCTS_PRICE_MANAGER ) === FALSE && strpos ( $PHP_SELF, FILENAME_PRODUCTS_OPTIONS_NAME ) === FALSE && (strpos( $PHP_SELF, FILENAME_CURRENCIES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_LANGUAGES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_SPECIALS ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_FEATURED ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_SALEMAKER ) === FALSE))
    Change to read:
    Code:
      if (strpos($PHP_SELF, FILENAME_MEDIA_MANAGER)===FALSE && strpos ( $PHP_SELF, FILENAME_PRODUCTS_PRICE_MANAGER ) === FALSE && strpos ( $PHP_SELF, FILENAME_PRODUCTS_OPTIONS_NAME ) === FALSE && (strpos( $PHP_SELF, FILENAME_CURRENCIES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_LANGUAGES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_SPECIALS ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_FEATURED ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_SALEMAKER ) === FALSE))
    If you do not have this, check your file is current and up to date ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: Music Samples with Media Manager

    My site says I am currently using: v1.3.9h

    This is the file: home/artbylow/public_html/shopping/includes/init_includes/init_sessions.php

    This is line 40: $domainPrefix = (!defined('SESSION_ADD_PERIOD_PREFIX') || SESSION_ADD_PERIOD_PREFIX == 'True') ? '.' : '';

    There is nothing like the referred line in this file.
    How do I re-install, if that's what you recommend? or should I upgrade to the latest version?
    I assume I should just backup my overide files.

  6. #6
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: Music Samples with Media Manager

    Any ideas? Anyone?

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,886
    Plugin Contributions
    6

    Default Re: Music Samples with Media Manager

    This is what the file looks like, the lines in RED where changed for this fix:
    Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2010 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: init_sessions.php 18031 2010-10-23 21:30:12Z wilt $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die('Illegal Access');
    }
    // require the session handling functions
      require(DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'sessions.php');
    
      zen_session_name('zenAdminID');
      zen_session_save_path(SESSION_WRITE_DIRECTORY);
    
    // set the session cookie parameters
    $path = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
    if (defined('SESSION_USE_ROOT_COOKIE_PATH') && SESSION_USE_ROOT_COOKIE_PATH  == 'True') $path = '/';
    $path = (defined('CUSTOM_COOKIE_PATH')) ? CUSTOM_COOKIE_PATH : $path;
    $domainPrefix = (!defined('SESSION_ADD_PERIOD_PREFIX') || SESSION_ADD_PERIOD_PREFIX == 'True') ? '.' : '';
    
    if (PHP_VERSION >= '5.2.0') {
      session_set_cookie_params(0, $path, (zen_not_null($cookieDomain) ? $domainPrefix . $cookieDomain : ''), FALSE, TRUE);
    } else {
      session_set_cookie_params(0, $path, (zen_not_null($cookieDomain) ? $domainPrefix . $cookieDomain : ''));
    }
    
    // lets start our session
      zen_session_start();
      $session_started = true;
    
    if (! isset ( $_SESSION ['securityToken'] ))
    {
      $_SESSION ['securityToken'] = md5 ( uniqid ( rand (), true ) );
    }
    if (isset ( $_GET ['action'] ) && in_array ( $_GET ['action'], array ('copy_options_values', 'update_options_values', 'update_value', 'add_product_option_values', 'copy_options_values_one_to_another_options_id', 'delete_options_values_of_option_name', 'copy_options_values_one_to_another', 'copy_categories_products_to_another_category_linked', 'remove_categories_products_to_another_category_linked', 'reset_categories_products_to_another_category_master', 'update_counter', 'update_orders_id', 'locate_configuration_key', 'locate_configuration', 'update_categories_attributes', 'update_product', 'locate_configuration', 'locate_function', 'locate_class', 'locate_template', 'locate_all_files', 'add_product', 'add_category', 'update_product_attribute', 'add_product_attributes', 'update_attributes_copy_to_category', 'update_attributes_copy_to_product', 'delete_option_name_values','delete_all_attributes', 'save', 'layout_save', 'update', 'update_sort_order', 'update_confirm', 'copyconfirm', 'deleteconfirm', 'insert', 'move_category_confirm', 'delete_category_confirm', 'update_category_meta_tags', 'insert_category' ) ))
    {
    //  if (strpos ( $PHP_SELF, FILENAME_PRODUCTS_PRICE_MANAGER ) === FALSE && strpos ( $PHP_SELF, FILENAME_PRODUCTS_OPTIONS_NAME ) === FALSE && (strpos( $PHP_SELF, FILENAME_CURRENCIES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_LANGUAGES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_SPECIALS ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_FEATURED ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_SALEMAKER ) === FALSE))
      if (strpos($PHP_SELF, FILENAME_MEDIA_MANAGER)===FALSE && strpos ( $PHP_SELF, FILENAME_PRODUCTS_PRICE_MANAGER ) === FALSE && strpos ( $PHP_SELF, FILENAME_PRODUCTS_OPTIONS_NAME ) === FALSE && (strpos( $PHP_SELF, FILENAME_CURRENCIES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_LANGUAGES ) === FALSE) && (strpos( $PHP_SELF, FILENAME_SPECIALS ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_FEATURED ) === FALSE)&& (strpos( $PHP_SELF, FILENAME_SALEMAKER ) === FALSE))
      {
        if ((! isset ( $_SESSION ['securityToken'] ) || ! isset ( $_POST ['securityToken'] )) || ($_SESSION ['securityToken'] !== $_POST ['securityToken']))
        {
          zen_redirect ( zen_href_link ( FILENAME_DEFAULT, '', 'SSL' ) );
        }
      }
    }
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  8. #8
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: Music Samples with Media Manager

    This is what my file looks like:
    code: <?php
    /**
    * session handling
    * see {@link http://www.zen-cart.com/wiki/index.p...als#InitSystem wikitutorials} for more details.
    *
    * @package initSystem
    * @copyright Copyright 2003-2010 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: init_sessions.php 18031 2010-10-23 21:30:12Z wilt $
    */
    if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
    }
    /**
    * sanity check in case zenid has been incorrectly supplied as an htmlencoded param name
    */
    if (!isset($_GET['zenid']) && isset($_GET['amp;zenid'])) {
    $_GET['zenid'] = $_GET['amp;zenid'];
    unset($_GET['amp;zenid']);
    } else if (isset($_GET['amp;zenid'])) {
    unset($_GET['amp;zenid']);
    }

    /**
    * require the session handling functions
    */
    require(DIR_WS_FUNCTIONS . 'sessions.php');
    /**
    * set the session name and save path
    */
    zen_session_name('zenid');
    zen_session_save_path(SESSION_WRITE_DIRECTORY);
    /**
    * set the session cookie parameters
    */
    $path = str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME']));
    if (defined('SESSION_USE_ROOT_COOKIE_PATH') && SESSION_USE_ROOT_COOKIE_PATH == 'True') $path = '/';
    $path = (defined('CUSTOM_COOKIE_PATH')) ? CUSTOM_COOKIE_PATH : $path;
    $domainPrefix = (!defined('SESSION_ADD_PERIOD_PREFIX') || SESSION_ADD_PERIOD_PREFIX == 'True') ? '.' : '';

    if (PHP_VERSION >= '5.2.0') {
    session_set_cookie_params(0, $path, (zen_not_null($cookieDomain) ? $domainPrefix . $cookieDomain : ''), FALSE, TRUE);
    } else {
    session_set_cookie_params(0, $path, (zen_not_null($cookieDomain) ? $domainPrefix . $cookieDomain : ''));
    }
    /**
    * set the session ID if it exists
    */
    if (isset($_POST[zen_session_name()])) {
    zen_session_id($_POST[zen_session_name()]);
    } elseif ( ($request_type == 'SSL') && isset($_GET[zen_session_name()]) ) {
    zen_session_id($_GET[zen_session_name()]);
    }
    /**
    * need to tidy up $_SERVER['REMOTE_ADDR'] here beofre we use it any where else
    * one problem we don't address here is if $_SERVER['REMOTE_ADDRESS'] is not set to anything at all
    */
    $ipAddressArray = explode(',', $_SERVER['REMOTE_ADDR']);
    $ipAddress = (sizeof($ipAddressArray) > 0) ? $ipAddressArray[0] : '';
    $_SERVER['REMOTE_ADDR'] = $ipAddress;
    /**
    * start the session
    */
    $session_started = false;
    if (SESSION_FORCE_COOKIE_USE == 'True') {
    zen_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, '/', (zen_not_null($current_domain) ? $current_domain : ''));

    if (isset($_COOKIE['cookie_test'])) {
    zen_session_start();
    $session_started = true;
    }
    } elseif (SESSION_BLOCK_SPIDERS == 'True') {
    $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
    $spider_flag = false;
    if (zen_not_null($user_agent)) {
    $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');
    for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
    if (zen_not_null($spiders[$i]) && substr($spiders[$i], 0, 4) != '$Id:') {
    if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
    $spider_flag = true;
    break;
    }
    }
    }
    }
    if ($spider_flag == false) {
    zen_session_start();
    $session_started = true;
    } else {
    if (isset($_GET['zenid']) && $_GET['zenid'] != '') {
    $tmp = (isset($_GET['main_page']) && $_GET['main_page'] != '') ? $_GET['main_page'] : FILENAME_DEFAULT;
    @header("HTTP/1.1 301 Moved Permanently");
    @zen_redirect(@zen_href_link($tmp, @zen_get_all_get_params(array('zenid')), $request_type, FALSE));
    unset($tmp);
    die();
    }
    }
    } else {
    zen_session_start();
    $session_started = true;
    }
    unset($spiders);
    /**
    * set host_address once per session to reduce load on server
    */
    if (!isset($_SESSION['customers_host_address'])) {
    if (SESSION_IP_TO_HOST_ADDRESS == 'true') {
    $_SESSION['customers_host_address']= @gethostbyaddr($_SERVER['REMOTE_ADDR']);
    } else {
    $_SESSION['customers_host_address'] = OFFICE_IP_TO_HOST_ADDRESS;
    }
    }
    /**
    * verify the ssl_session_id if the feature is enabled
    */
    if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == 'true') && ($session_started == true) ) {
    $ssl_session_id = $_SERVER['SSL_SESSION_ID'];
    if (!$_SESSION['SSL_SESSION_ID']) {
    $_SESSION['SSL_SESSION_ID'] = $ssl_session_id;
    }
    if ($_SESSION['SSL_SESSION_ID'] != $ssl_session_id) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_SSL_CHECK));
    }
    }
    /**
    * verify the browser user agent if the feature is enabled
    */
    if (SESSION_CHECK_USER_AGENT == 'True') {
    $http_user_agent = $_SERVER['HTTP_USER_AGENT'];
    if (!$_SESSION['SESSION_USER_AGENT']) {
    $_SESSION['SESSION_USER_AGENT'] = $http_user_agent;
    }
    if ($_SESSION['SESSION_USER_AGENT'] != $http_user_agent) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_LOGIN));
    }
    }
    /**
    * verify the IP address if the feature is enabled
    */
    if (SESSION_CHECK_IP_ADDRESS == 'True') {
    $ip_address = zen_get_ip_address();
    if (!$_SESSION['SESSION_IP_ADDRESS']) {
    $_SESSION['SESSION_IP_ADDRESS'] = $ip_address;
    }
    if ($_SESSION['SESSION_IP_ADDRESS'] != $ip_address) {
    zen_session_destroy();
    zen_redirect(zen_href_link(FILENAME_LOGIN));
    }
    }

    Would you recommend I put the other file in an overide folder, or paste in the missing lines?

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,886
    Plugin Contributions
    6

    Default Re: Music Samples with Media Manager

    The confusion is, the file that needs to be changed is:
    /your_secret_admin/includes/init_includes/init_sessions.php

    You are looking at your catalog file ...

    Go look at the correct file to make the changes ...

    NOTE: there are no override files for the Admin ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  10. #10
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: Music Samples with Media Manager

    That was it! Whoopee! Works perfectly now.
    Muchas , Muchas Gracias!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Unable to upload media using media manager
    By ThomasT in forum Basic Configuration
    Replies: 17
    Last Post: 5 Aug 2010, 08:04 PM
  2. Problem with music samples
    By trebo70 in forum General Questions
    Replies: 2
    Last Post: 13 Jul 2008, 04:36 AM
  3. Changing sort order of media clips in media manager
    By Lovere in forum General Questions
    Replies: 2
    Last Post: 12 Jul 2006, 08:04 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
  •