Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. zpupster

    Index Carousel add on

    TY puddleC, I removed that dot before when i replaced it this error returned: Parse error: syntax error, unexpected '$wrapper_slides' (T_VARIABLE) in catalog/includes/modules/content/index/cm_i_carousel.php on line 93
  3. Today
  4. puddlec

    Index Carousel add on

    in catalog\includes\modules\content\index\cm_i_carousel.php change class cm_carousel { to class cm_i_carousel { edit: just noticed line 92 is also incorrect change to $wrapper_slides .= tep_image('images/' . $banner['banners_image'], '', 800, 400);
  5. Alright, so I'm attempting to just add a CSS class to a selected category link. I'm trying to get more familiar with the category tree (category_tree.php) and the only thing I've found that controls the selected output is the following: $OSCOM_CategoryTree->setCategoryPath($cPath, '<strong>', '</strong>'); This, of course, just bolds the current selected category. However, I'm just looking to do something similar to this (see the "CUSTOM_CSS_CLASS"): <a class="list-group-item list-group-item-action CUSTOM_CSS_CLASS" href="http://mywebsite.com/catalog/index.php?cPath=3"><strong>Electronics</strong></a> Is there a way to achieve this with any of the available functions within category tree?
  6. support, i have an old add on from here: we are presently updating our website. using frozen 2341CE and our host php7.1. we like this addon i have eliminated all errors but it is not showing in content modules to be installed. below is the code. Z catalog\includes\modules\content\index\templates\tpl_cm_i_carousel.php <!-- <div id="carousel" class="col-sm->--> <?php /* echo $content_width; */?> <div id="carousel" class="banner-width"> <?php echo $carousel; ?> </div> catalog\includes\languages\english\modules\content\index\cm_i_carousel.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ //const MODULE_FRONT_PAGE_BANNER_ROTATOR_TITLE = 'Carousel Banners For Home Page'; //const MODULE_FRONT_PAGE_BANNER_ROTATOR_DESCRIPTION = 'Adds a carousel to Home Page with banner images set from Banner Manager.'; define('MODULE_FRONT_PAGE_BANNER_ROTATOR_TITLE ', 'Carousel Banners For Home Page'); define('MODULE_FRONT_PAGE_BANNER_ROTATOR_DESCRIPTION ', 'Adds a carousel to Home Page with banner images set from Banner Manager.'); ?> catalog\includes\modules\content\index\cm_i_carousel.php <?php /* $Id: banner_rotator.php v1.1.2 20110108 Kymation $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class cm_carousel { var $code; var $group; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->code = get_class($this); $this->group = basename(dirname(__FILE__)); $this->title = MODULE_FRONT_PAGE_BANNER_ROTATOR_TITLE; $this->description = MODULE_FRONT_PAGE_BANNER_ROTATOR_DESCRIPTION; if (defined('MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS')) { $this->sort_order = MODULE_FRONT_PAGE_BANNER_ROTATOR_SORT_ORDER; $this->enabled = (MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS == 'True'); } } function execute() { global $PHP_SELF, $oscTemplate, $cPath; $content_width = (int)MODULE_FRONT_PAGE_BANNER_ROTATOR_CONTENT_WIDTH; if ($PHP_SELF == 'index.php' && $cPath == '') { // Set the Javascript to go in the header $footer_scripts = '<script>' . '$(\'#carousel-example-generic.carousel\').carousel({ interval: ' . ( int ) MODULE_FRONT_PAGE_BANNER_ROTATOR_HOLD_TIME . '})' . "\n" .'</script>'; $oscTemplate->addBlock($footer_scripts, 'footer_scripts'); // Set the banner rotator code to display on the front page $banner_query_raw = " select banners_id, banners_url, banners_image, banners_html_text from " . TABLE_BANNERS . " where banners_group = '" . MODULE_FRONT_PAGE_BANNER_ROTATOR_GROUP . "' and status order by banners_id " . MODULE_FRONT_PAGE_BANNER_ROTATOR_BANNER_ORDER . " limit " . MODULE_FRONT_PAGE_BANNER_ROTATOR_MAX_DISPLAY; $banner_query = tep_db_query($banner_query_raw); if (tep_db_num_rows($banner_query) > 0) { $body_text = '<!-- Banner Rotator BOF -->' . "\n"; $body_text .= ' <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">' . "\n"; $indicators = '<!-- Indicators --> <ol class="carousel-indicators">'; $wrapper_slides = '<!-- Wrapper for slides -->' . "\n" . '<div class="carousel-inner">'; $background = $this->createImage(800, 400, 118, 115, 115); $counter = 0; while ($banner = tep_db_fetch_array($banner_query)) { $indicators .= ' <li data-target="#carousel-example-generic" data-slide-to="' . $counter . '"' . ($counter == 0 ? 'class="active"' : '') . '></li>'; $wrapper_slides .= ' <div class="item' . ($counter == 0 ? ' active' : '') . '">'; if ($banner['banners_url'] != '') { $wrapper_slides .= '<a href="' . tep_href_link('redirect.php', 'action=banner&goto=' . $banner['banners_id']) . '">'; } //$wrapper_slides .= tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_html_text']); if ($banner['banners_image'] !== '') { //$wrapper_slides .= tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_html_text']); $wrapper_slides .= tep_image(images/ $banner['banners_image'], '', 800, 400); $wrapper_slides .= '<div class="carousel-caption"> </div>'; } else { //$wrapper_slides .= tep_image(DIR_WS_IMAGES . 'pixel_silver.gif', 'alt', 544, 172 ); $wrapper_slides .= '<img class="img-responsive" alt="544x172" src="' . $background . '" />'; $wrapper_slides .= '<div class="carousel-caption">' . $banner['banners_html_text'] . '</div>'; } if ($banner['banners_url'] != '') { $wrapper_slides .= '</a>'; } $wrapper_slides .= ' </div>' . "\n"; $counter++; } $indicators .= '</ol>'; // close indicator $wrapper_slides .= '</div>'; // wrapper close $controls = ' <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a>'; // öszefuzés $body_text .= $indicators . $wrapper_slides . $controls; $body_text .= ' </div><p> </p>' . "\n"; $body_text .= ' <div class="clearfix"></div>' . "\n"; $body_text .= '<!-- Banner Rotator EOF -->' . "\n"; $carousel = $body_text; } ob_start(); include('includes/modules/content/' . $this->group . '/templates/tpl_cm_i_carousel.php'); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_CONTENT_WIDTH', '12', 'What width container should the content be shown in?', '6', '1', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Banner Rotator', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS', 'True', 'Do you want to show the banner rotator?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Hold Time', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_HOLD_TIME', '4000', 'The time each banner is shown. 1000 = 1 second', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Banner Order', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_BANNER_ORDER', 'Desc', 'Order that the Banner Rotator uses to show the banners.', '6', '0', 'tep_cfg_select_option(array(\'Asc\', \'Desc\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banner Rotator Group', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_GROUP', 'rotator', 'Name of the banner group that the Banner Rotator uses to show the banners.', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banner Rotator Max Banners', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_MAX_DISPLAY', '6', 'Maximum number of banners that the Banner Rotator will show', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array ( 'MODULE_FRONT_PAGE_BANNER_ROTATOR_CONTENT_WIDTH', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_SORT_ORDER', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_HOLD_TIME', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_BANNER_ORDER', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_GROUP', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_MAX_DISPLAY' ); } function createImage($width = 800, $height = 400, $red = 255, $green = 0, $blue = 0) { $im = imagecreatetruecolor($width, $height); // sets background to red $color = imagecolorallocate($im, (int)$red, (int)$green, (int)$blue); imagefill($im, 0, 0, $color); //header('Content-type: image/png'); ob_start(); imagepng($im); $contents = ob_get_contents(); ob_end_clean(); imagedestroy($im); $imgData = base64_encode($contents); $src = 'data: image/png;base64,'.$imgData; return $src; } } ?>
  7. No not sure about that but this is a good one to make stock updates more bearable, you can select my manufacturer or cat's and make changes and update . Quick update BS Alternativly you could run a simple SQL script in phpAdmin. I'm sure one of the db experts will be able to help. Something like this, Backup first and only run simulation to test first. We look in products for all product with zero quantity and chage it to 20. UPDATE `products` SET `products_quantity` = REPLACE(`products_quantity`, "0", "20");
  8. Nope, fresh install The file tpl_cm_pi_jcm_buy_button.php is in the templates director of JcM Product info No stock buy button V1.0\includes\modules\content\product_info\templates So I hope I have installed the right software Changed to <script> $('.btn-danger').prop("disabled", false).click(function() { console.log('nnn'); }) </script> And all working now One last question before I head to bed... Do you have a recommendation of a app / module that will list all produces with a stock level of 0 or less and allow the stock level to be easily adjusted Or even at the most basic just the stock level report of item with 0 and less
  9. Do you have any other nostock installed? That sounds like the js script used in JcM buy button. Look in buy button template file for /public_html/includes/modules/content/product_info/templates/tpl_cm_pi_jcm_buy_button.php <script> $('.btn-danger').prop("disabled", true).click(function() { console.log('nnn'); }) </script> and remove or comment out. Also may have to remove fas fa-ban or fa-fa-ban 😊 When you make mod's to an add-on to use it for somthing else you have to look at all the functions it is using and edit or remove as required.
  10. Ok I got JcM Product listing No Stock Buy Button V1.0 CE working as a Pre-Order button so customer knows the item is out of stock but can pre-order it for when the next container shipment arrives. But having a small issue with this one, so edited public_html/includes/modules/content/product_info/templates/tpl_cm_pi_jcm_buy_button.php to read } else { // Show red button with pre-order and allow purchase echo tep_draw_button(MODULE_CONTENT_PI_JCM_BUY_BUTTON_TEXT2, 'fa fa-shopping-cart', null, 'primary', array('params' => 'data-has-attributes="' . (($products_attributes['total'] > 0) ? '1' : '0') . '" data-in-stock="' . (int)$product_info['products_quantity'] . '" data-product-id="' . (int)$product_info['products_id'] . '"'), 'btn-success btn-block btn-lg btn-product-info btn-buy m-2'); I can click on the button while btn-success is there which makes the button green but when I change it to btn-danger and hover over the button I get the circle with a cross threw it and can't click
  11. If it's just some orders, and it's fairly old osC code, I've seen this problem with customers failing to properly return to the store after completing payment. That is, they "back" up or otherwise go off someplace else from the PayPal site, and never return to the store to complete the transaction. This assumes it's a PayPal mode that takes the customer offsite (to paypal.com). I think that some of the more recent osC versions may have code to successfully complete the transaction even if the customer never returns (but PayPal signals that it completed). You might look around at that (and discussion on this forum). Otherwise, it's operator error. About the best you could do is to put in a BIG REMINDER before they're sent off to the PayPal site that they need to come back to your store in a certain way, for the transaction to complete.
  12. supercheaphobb

    Frozen BS customer side customisation

    Finally got it to work and put it in put it in user.css now to go give it a better name #test > li > a { padding: 5px 15px; }
  13. emahajan

    Paypal Express 3.1 not working properly.(Sandbox)

    Jack, As I am using one page checkout into my shop, can you point out how it can be done?
  14. JcMagpie

    Frozen BS customer side customisation

    Yes 😊 css like this, I will get a lot of flack for this I'm sure. Best to not mix it in the html, add to start or end of file. Or if you wish put the css in your user.css and add some text to remember what it's for. I personaly use the templete files as custom files and keep css relavent only to that add-on in that file. Other will disagree with this approach, so stick it in the user.css if you like. <div class="panel panel-default"> <div class="panel-heading"><?php echo MODULE_BOXES_CATEGORIES_BOX_TITLE; ?></div> <?php echo $category_tree; ?> </div> <style> i#test { padding: 5px 15px; } </style>
  15. So - to feed back. With help from Raiwa, I've achieved what I wanted. Static horizontal menu at top appears all the time. When you click on a category then a vertical sub-menu appears just showing the level in the category you're at. I created a new module for this, but you don't have to. You could just amend bm_categories.php and the template file (tpl_bm_categories.php). Changed the function execute() to: function execute() { global $oscTemplate, $cPath, $current_category_id; $OSCOM_CategoryTree = new category_tree(); $OSCOM_CategoryTree->setCategoryPath($cPath, '<strong>', '</strong>'); // sets cateogory tree to current level only $OSCOM_CategoryTree->setRootCategoryID((int)$current_category_id); $OSCOM_CategoryTree->setParentGroupString('<ul class="nav nav-pills nav-stacked">', '</ul>', true); // defined category title - to call in template bm_categories $category_title = $OSCOM_CategoryTree->getData($current_category_id, 'name'); $category_tree = $OSCOM_CategoryTree->getTree(); ob_start(); include('includes/modules/boxes/templates/tpl_' . basename(__FILE__)); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } Then I amended the template file - to only show this when a category has been selected. <?php if (!empty($category_title)) {?><div class="panel panel-default bm-nav-categories"><div class="panel-heading"><?php echo MODULE_BOXES_CATEGORIES2_BOX_TITLE; ?> <?php echo $category_title; ?></div> <?php echo $category_tree;?></div><?php } else {return null;} ?> Of course styles etc may be different on others versions. But it seems to work, so might be helpful to others. Thanks for your help Raiwa!
  16. supercheaphobb

    Frozen BS customer side customisation

    So template file you mean public_html/includes/modules/boxes/templates/categories.php ? <div class="panel panel-default"> <div class="panel-heading"><?php echo MODULE_BOXES_CATEGORIES_BOX_TITLE; ?></div> <style> i#test { padding: 5px 15px; } </style> <?php echo $category_tree; ?> </div>
  17. MrPhil

    PayPal App v5.018 Log In with PayPal is now dead

    At this point, I see no reason to carry this further, here. If you think there are security problems, feel free to start a new topic/thread and continue that part of the discussion there. Perhaps someone more familiar with the work and reasons for changing to the short forms ( @burt ?) could speak to this. Has Pete found an area of legitimate concern, or is he mistaken? In places where these superglobals could potentially be used to inject nasties, I was under the impression that cleanup was done on a case-by-case basis rather than globally. Of course, this does increase the chance that some case will be overlooked! Are "magic quotes" still around? I thought I heard about their being withdrawn. Certainly, we should always be on the lookout for places where $_* could be used to inject malicious code. Should cleanup be restricted to places where it could actually be used to do something bad (in HTML sent back to the browser, in database fields, etc.)? Is there such a thing as a universal cleanup that could be done?
  18. supercheaphobb

    Frozen BS customer side customisation

    Ok I cleaned up the line in search.php and it now reads <div class="panel-footer"><a href="<?php echo tep_href_link('advanced_search.php') . '"><strong>' . MODULE_BOXES_SEARCH_BOX_ADVANCED_SEARCH . '</strong></a>'; ?></div> So with out the <?php echo MODULE_BOXES_SEARCH_BOX_TEXT . '<br /> it produces the desired result Off to look at bm_categories.php
  19. JcMagpie

    Frozen BS customer side customisation

    Ok find public_html/includes/modules/boxes/bm_categories.php make this change to line 40, $OSCOM_CategoryTree->setParentGroupString('<ul class="nav nav-pills nav-stacked" id="test">', '</ul>', true); Then add css to template file like so, <style> i#test { padding:20px; } </style>
  20. JcMagpie

    Frozen BS customer side customisation

    This is not recomended as It might produce unexpected results and/or errors without end tag. The cat's I'm n0t sure is the honist answer as I have never made any changes to stock cat's but yes you need to find the file producing the html code and add the id, will be in the function or in class just have to have a poke around. More trouble than it's worth to be honist.
  21. supercheaphobb

    Frozen BS customer side customisation

    @JcMagpie Ok that is a very handy bit of info and something new I have just learned. The search box gets smaller when I remove the from <br /> (line break) from "<?php echo MODULE_BOXES_SEARCH_BOX_TEXT . '<br />" in public_html/includes/modules/boxes/templates/search.php So this issue is now resolved I will apply your hint to categories just to reduce the padding a little, but public_html/includes/modules/boxes/templates/categories.php only deals with the heading of the categories box not the category listings I have been unable to find the file the produces the categories list, can you please assist. So once I find the file I change this <ul class="nav nav-pills nav-stacked"> to <ul class="nav nav-pills nav-stacked" id-"mycat"> and the css would be .nav > li > a #mycat position: relative; display: block; padding: 10px 15px; }
  22. Does any of the affected sites and orders use any sort of discount module/functionality? i.e discount codes/coupons? I've seen this happen before due to the way tax is calculated and rounding in the store versus how PayPal calculates tax and discounts. When the two figures don't match up during the callback (usually 1pence/1cents difference) the store will not accept the result and the process fails, no emails sent, baskets not cleared etc.
  23. Sure understand your problem, add-on was made for someone who did not wish to have cart active at all so button was replaced with dead button. So to make active to add to cart use this, mod as required. You are basicly adding an active button again. if ( tep_get_products_stock($listing['products_id']) > 0 ) { $prod_list_contents .= tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$listing['products_id']), NULL, array('params' => 'data-has-attributes="' . ((tep_has_product_attributes((int)$listing['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$listing['in_stock'] . '" data-product-id="' . (int)$listing['products_id'] . '"'), 'btn-success btn-product-listing btn-buy'); } else { $prod_list_contents .= tep_draw_button(IMAGE_BUTTON_OUT_OF_STOCK, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$listing['products_id']), NULL, array('params' => 'data-has-attributes="' . ((tep_has_product_attributes((int)$listing['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$listing['in_stock'] . '" data-product-id="' . (int)$listing['products_id'] . '"'), 'btn-danger btn-product-listing btn-buy'); You will need to do the same in product_info if you modded that.
  24. Hi @JcMagpie hoping you don't get sick of all my questions I removed disabled from $prod_list_contents .= tep_draw_button(IMAGE_BUTTON_OUT_OF_STOCK, 'fa fa-ban', NULL, NULL, NULL, 'btn-danger btn-product-listing btn-buy'); I can click the button but is does not do anything complete code snippet below from Frozen BS3 if ( tep_get_products_stock($listing['products_id']) > 0 ) { $prod_list_contents .= tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$listing['products_id']), NULL, array('params' => 'data-has-attributes="' . ((tep_has_product_attributes((int)$listing['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$listing['in_stock'] . '" data-product-id="' . (int)$listing['products_id'] . '"'), 'btn-success btn-product-listing btn-buy'); } else { $prod_list_contents .= tep_draw_button(IMAGE_BUTTON_OUT_OF_STOCK, 'fa fa-ban', NULL, NULL, NULL, 'btn-danger btn-product-listing btn-buy');
  25. JcMagpie

    Frozen BS customer side customisation

    Oh yes to answer you main question to edit class look for the template file used so for box search you need public_html/includes/modules/boxes/templates/search.php change <div class="panel panel-default"> to <div class="panel panel-default" id-"yourid">
  26. JcMagpie

    Frozen BS customer side customisation

    example, we add the id="test" to one section and change a color, you see it affects only one box and only one part of that box.
  1. Load more activity
×