Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Papanco

Members
  • Posts

    34
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Papanco

  1. On 2/19/2024 at 11:22 AM, pandrei said:

    Please remove RestServer from the AppShop->Local Storage and then try install it again

    @pandrei I installed the API but when I open easypopulate I get an error page. Solution?

  2. 19 hours ago, Jack_mcs said:

    @PapancoIn the googlefeeder.php file, change the OPTIONS_ENABLED_GOOGLE_UTM setting  to 0 or 1, depending on if you are using that google option.. Then find this line

    
    define('OPTIONS_GOOGLE_UTM', '?utm_source=GoogleBase1&utm_medium=BaseFeed1&utm_campaign=products'); //see http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55578

    and replace it with this

    
    if (OPTIONS_ENABLED_GOOGLE_UTM == 0) {
       define('OPTIONS_GOOGLE_UTM', '?store={my_store_code}'); 
    } else {
       define('OPTIONS_GOOGLE_UTM', '?store={my_store_code}&utm_source=GoogleBase1&utm_medium=BaseFeed1&utm_campaign=products'); //see http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55578
    }

    As before, be sure to change the "my_store_cde" with yours.

    @Jack_mcs thanks for the support: I did a test but with UTM == 0 the store code is not inserted in the URL. If I enable UTM on 1, the UTM URL is correctly entered but the store code is not inserted in the URL. what else can i try?

  3. @Gyakutsuki really interesting: for the product discount, is there something like the old quantity discount? (https://apps.oscommerce.com/qHHSa&quantity-price-breaks-per-product-price) maybe the same qpbpp could be extended to the attributes like Zencart Attributes Qty Price Discount.

  4. 13 hours ago, hungryfrank said:
    
    DROP TABLE IF EXISTS  `administrator_group_access` ;
    CREATE TABLE `administrator_group_access` (
      `administrator_group_access_id` int(11) NOT NULL,
      `administrator_group_id` int(11) NOT NULL,
      `administrator_group_block` varchar(1000) CHARACTER SET utf8 NOT NULL,
      `administrator_group_access_file` varchar(50) CHARACTER SET utf8 NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    ALTER TABLE `administrator_group_access`
      ADD PRIMARY KEY (`administrator_group_access_id`);
    ALTER TABLE `administrator_group_access`
      MODIFY `administrator_group_access_id` int(11) NOT NULL AUTO_INCREMENT;

    run this in your phpmyadmin

    Thanks Frank , it works fine now!

  5. Original product_info:

    <?php
    /*
      $Id$

      osCommerce, Open Source E-Commerce Solutions
     
        if (tep_not_null($product_info['products_model'])) {
          $products_name .= '<br /><small>[<span itemprop=model">' . $product_info['products_model] . '</span>]</small>';
        }
    ?>

    <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>

    <div itemscope itemtype="http://schema.org/Product">

    <div class="page-header">
      <h1 class="pull-right" itemprop="offers" itemscope itemtype="
    http://schema.org/Offer"><?phpecho $products_price; ?></h1>
      <h1><?php echo $products_name; ?></h1>
    </div>

    <?php
      if ($messageStack->size('product_action') > 0) {
        echo $messageStack->output('product_action');
      }
    ?>

    <div class="contentContainer">
      <div class="contentText">

    <?php
        if (tep_not_null($product_info['products_image'])) {

          echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], NULL, NULL, NULL, 'itemprop="image" style="display:none;"');

          $photoset_layout = '1';

          $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");
          $pi_total = tep_db_num_rows($pi_query);

          if ($pi_total > 0) {
            $pi_sub = $pi_total-1;

            while ($pi_sub > 5) {
              $photoset_layout .= 5;
              $pi_sub = $pi_sub-5;
            }

            if ($pi_sub > 0) {
              $photoset_layout .= ($pi_total > 5) ? 5 : $pi_sub;
            }
    ?>

        <div id="piGal" data-imgcount="<?php echo $photoset_layout; ?>">

    <?php
            $pi_counter = 0;
            $pi_html = array();

            while ($pi = tep_db_fetch_array($pi_query)) {
              $pi_counter++;

              if (tep_not_null($pi['htmlcontent'])) {
                $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
              }

              echo tep_image(DIR_WS_IMAGES . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '"');
            }
    ?>

        </div>

    <?php
            if ( !empty($pi_html) ) {
              echo '    <div style="display: none;">' . implode('', $pi_html) . '</div>';
            }
          } else {
    ?>

        <div id="piGal">
          <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name'])); ?>
        </div>

    <?php
          }
        }
    ?>

    <div itemprop="description">
      <?php echo stripslashes($product_info['products_description']); ?>
    </div>

    <?php
        $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
        $products_attributes = tep_db_fetch_array($products_attributes_query);
        if ($products_attributes['total'] > 0) {
    ?>

        <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4>

        <p>
    <?php
          $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
          while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
            $products_options_array = array();
            $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
            while ($products_options = tep_db_fetch_array($products_options_query)) {
              $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
              if ($products_options['options_values_price'] != '0') {
                $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
              }
            }

            if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
              $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
            } else {
              $selected_attribute = false;
            }
    ?>
          <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"'); ?><br />
    <?php
          }
    ?>
        </p>

    <?php
        }
    ?>

        <div class="clearfix"></div>

    <?php
        if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
    ?>

        <div class="alert alert-info"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></div>

    <?php
        }
    ?>

      </div>

    <?php
        $reviews_query = tep_db_query("select count(*) as count, avg(reviews_rating) as avgrating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");
        $reviews = tep_db_fetch_array($reviews_query);

        if ($reviews['count'] > 0) {
          echo '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><metaitemprop="ratingValue" content="' . $reviews['avgrating'] . '" /><meta itemprop="ratingCount" content="' . $reviews['count'] . '" /></span>';
        }
    ?>

      <div class="buttonSet row">
        <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'glyphicon glyphicon-comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?></div>
        <div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'glyphicon glyphicon-shopping-cart', null, 'primary', null, 'btn-success'); ?></div>
      </div>

      <div class="row">
        <?php echo $oscTemplate->getContent('product_info'); ?>
      </div>

    <?php
        if ((USE_CACHE == 'true') && empty($SID)) {
          echo tep_cache_also_purchased(3600);
        } else {
          include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
        }

        if ($product_info['manufacturers_id'] > 0) {
          $manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$product_info['manufacturers_id'] . "'");
          if (tep_db_num_rows($manufacturer_query)) {
            $manufacturer = tep_db_fetch_array($manufacturer_query);
            echo '<span itemprop="manufacturer" itemscope itemtype="http://schema.org/Organization"><metaitemprop="name" content="' . tep_output_string($manufacturer['manufacturers_name']) . '" /></span>';
          }
        }
    ?>

    </div>

    </div>

    </form>

    <?php
      }
      require(DIR_WS_INCLUDES . 'template_bottom.php');
      require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>

    -----------------------------------------------------------------------------------------------------------------

    -----------------------------------------------------------------------------------------------------------------

    modified product_info

     

    <?php
    /*
      $Id$

      osCommerce, Open Source E-Commerce Solutions
     
        if (tep_not_null($product_info['products_model'])) {
          $products_name .= '<br /><small>[<span itemprop=model">' . $product_info['products_model] . '</span>]</small>';
        }
    ?>

    <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>

    <div itemscope itemtype="http://schema.org/Product">

    <div class="page-header">
      <h1 class="pull-right" itemprop="offers" itemscope itemtype="
    http://schema.org/Offer"><?phpecho $products_price; ?></h1>
      <h1><?php echo $products_name; ?></h1>
    </div>

    <?php
      if ($messageStack->size('product_action') > 0) {
        echo $messageStack->output('product_action');
      }
    ?>

    <div class="contentContainer">
      <div class="contentText">

    <?php
        if (tep_not_null($product_info['products_image'])) {

          // OPI edited
          echo tep_image(DIR_WS_IMAGES . 'thumbs/def/display/' . $product_info['products_image'], NULL, NULL, NULL, 'itemprop="image" style="display:none;"');

          $photoset_layout = '1';

          $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");
          $pi_total = tep_db_num_rows($pi_query);

          if ($pi_total > 0) {
            $pi_sub = $pi_total-1;

            while ($pi_sub > 5) {
              $photoset_layout .= 5;
              $pi_sub = $pi_sub-5;
            }

            if ($pi_sub > 0) {
              $photoset_layout .= ($pi_total > 5) ? 5 : $pi_sub;
              // OPI edited
              $opi_thumb = 'thumbs/def/display' . (($pi_total > 5) ? '5' : $pi_sub) . '/';
            }
    ?>

        <div id="piGal" data-imgcount="<?php echo $photoset_layout; ?>">

    <?php
            $pi_counter = 0;
            $pi_html = array();

            while ($pi = tep_db_fetch_array($pi_query)) {
              $pi_counter++;

              if (tep_not_null($pi['htmlcontent'])) {
                $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
              }

              // OPI edited
              echo tep_image(DIR_WS_IMAGES . (($pi_counter > 1)? $opi_thumb : 'thumbs/def/display1/') . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '" data-highres="'. DIR_WS_IMAGES . $pi['image'] .'"');
            }
    ?>

        </div>

    <?php
            if ( !empty($pi_html) ) {
              echo '    <div style="display: none;">' . implode('', $pi_html) . '</div>';
            }
          } else {
    ?>

        <div id="piGal">
          <?php
          // OPI edited
          echo tep_image(DIR_WS_IMAGES . 'thumbs/def/display1/' . $product_info['products_image'], addslashes($product_info['products_name']), '', '', 'id="piGalImg_' . $pi_counter . '" data-highres="'. DIR_WS_IMAGES . $product_info['products_image'] .'"');
          ?>
        </div>

    <?php
          }
        }
    ?>

    <div itemprop="description">
      <?php echo stripslashes($product_info['products_description']); ?>
    </div>

    <?php
        $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
        $products_attributes = tep_db_fetch_array($products_attributes_query);
        if ($products_attributes['total'] > 0) {
    ?>

        <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4>

        <p>
    <?php
          $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
          while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
            $products_options_array = array();
            $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
            while ($products_options = tep_db_fetch_array($products_options_query)) {
              $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
              if ($products_options['options_values_price'] != '0') {
                $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
              }
            }

            if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
              $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
            } else {
              $selected_attribute = false;
            }
    ?>
          <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'style="width: 200px;"'); ?><br />
    <?php
          }
    ?>
        </p>

    <?php
        }
    ?>

        <div class="clearfix"></div>

    <?php
        if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
    ?>

        <div class="alert alert-info"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></div>

    <?php
        }
    ?>

      </div>

    <?php
        $reviews_query = tep_db_query("select count(*) as count, avg(reviews_rating) as avgrating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");
        $reviews = tep_db_fetch_array($reviews_query);

        if ($reviews['count'] > 0) {
          echo '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><metaitemprop="ratingValue" content="' . $reviews['avgrating'] . '" /><meta itemprop="ratingCount" content="' . $reviews['count'] . '" /></span>';
        }
    ?>

      <div class="buttonSet row">
        <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'glyphicon glyphicon-comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?></div>
        <div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'glyphicon glyphicon-shopping-cart', null, 'primary', null, 'btn-success'); ?></div>
      </div>

      <div class="row">
        <?php echo $oscTemplate->getContent('product_info'); ?>
      </div>

    <?php
        if ((USE_CACHE == 'true') && empty($SID)) {
          echo tep_cache_also_purchased(3600);
        } else {
          include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
        }

        if ($product_info['manufacturers_id'] > 0) {
          $manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$product_info['manufacturers_id'] . "'");
          if (tep_db_num_rows($manufacturer_query)) {
            $manufacturer = tep_db_fetch_array($manufacturer_query);
            echo '<span itemprop="manufacturer" itemscope itemtype="http://schema.org/Organization"><metaitemprop="name" content="' . tep_output_string($manufacturer['manufacturers_name']) . '" /></span>';
          }
        }
    ?>

    </div>

    </div>

    </form>

    <?php
      }
      require(DIR_WS_INCLUDES . 'template_bottom.php');
      require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>

    -----------------------------------------------------------------------------------------------

    -----------------------------------------------------------------------------------------------

  6. @@Papanco,

     

    The admin image you posted (www. vacanzaebenessere .com/admin.jpg) shows the opi modified categories.php, try the original 2.3.4 bootstrap, load up the additional images and check if they show correct in product_info.php.

    If they show then correct, it's a problem of the image upload part in admin/categories.php. I DO NOT give support for that part, Sorry!

     

    In any case it is impossible to say where is the exact error, access to your admin and database would be needed.

    the additional images are inserted correctly into the database and into their respective folders but not seen in product_info

  7. Hello Gianfranco,

     

    Please specify if you refer to rename the thumbnails or the original full size images.

    It would be also helpful to tell us which are your desired auto rename rules. For example: category name+correlative numbering or size in the case of thumbnails.

     

    If you refer to rename the original full size images, this is not the correct topic, nothing to do with image thumbnailer, you should open a newTopic.

     

    If you refer to the thumbnails, they were auto renamed adding the thumb size to the names in older version until version 20.

     

    Then in version 21 the subdirectory structure was added and the renaming removed.

    If you wish something like this, download version 20 and have a look on the coding in:

    includes/modules/kiss_image_thumbnailer/classes/Image_Helper.php

    line 70:

          $this->_thumb_filename = $this->attributes['width'] . 'x' . $this->attributes['height'] . '_' . $this->_image_name;
    

    and modify for your needs.

     

    regards

    Rainer

    Hello Rainer, thanks for the help: I want to rename the picture file with the name of the product (like contrib OPI images).

    currently I use version r22 on osc 234 Gold BS

    How can I do?

    Thank you

    Gianfranco

     

×
×
  • Create New...