Jump to content
Latest News: (loading..)

Tsimi

♥Ambassador
  • Content count

    2,202
  • Joined

  • Last visited

  • Days Won

    73

Everything posted by Tsimi

  1. Module Header Tags > Category SEO help please

    If you type something and save is that entry stored inside the database? Or is it empty.
  2. This is the support thread for the App Keyword Highlighter. Available here: https://apps.oscommerce.com/DNn0b&keyword-highlighter Special thanks to @puggybelle for sponsoring this App and allowing it to be shared with others.
  3. This is the support topic for the Featured Products BS Addon. All credits to DunWeb Designs. I just converted to Bootstrap and fix some minor typos. http://addons.oscommerce.com/info/9355 Core code changes are necessary but only very, very few. Enjoy!
  4. @burt Is there anything, function or visual in BS4 that you think has significantly improved to its predecessor BS3?
  5. I am currently working on a Points and Rewards system for osC BS GOLD and EDGE. There are currently 2 addons out there that are more or less working if you take bits and pieces from each one of them. I have currently installed the Points and Rewards feature into an Edge test shop and all seems to work fine. The idea of such points system is interesting but unfortunately it is one of those addons that require a lot core file changes or better let's say code additions. There are more ADD AFTER than REPLACE WITH parts. I have managed to reduce the install steps by implementing some stuff into the module and new additional files. More improvement is possible I know it but first I want to get it working before going deeper into it. I still need to make the necessary Bootstrap design changes to some of the new files and then it's time for bug hunting. I was wondering did someone ever create one for BS? Or did anyone ever attempt to make one for BS? No need to recreate everything again if it has already been done. As soon I have all the design stuff fixed I will add a beta package here.
  6. This following package is based on the Discount Code for osCommerce 2.3.1 Addon. I was able to reduce the install process from 16 steps down to 9 steps. Database tables and filenames definition have been removed. I tried to keep the code changes to a minimum. SQL install/uninstall is done automatically with the ot_ module. Download:
  7. https://forums.oscommerce.com/topic/359350-change-the-text-new-products-for-month/?do=findComment&comment=1514519 Could be implemented into the products_new.php page?
  8. preg_replace to preg_replace_callback

    Just found this thread here. I need to get the following code up to date since it doesn't work in PHP 7 anymore. Getting this error message: I know that #se in the code below is the /e modifier and that's about it with my understanding. Most support solutions I found on stackoverflow talkj about simple preg_replace cases but the following is a bit harder I think. function tsimi ($text, $token, $class) { $text = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . $token . ")\b#i', '<span class=\"" . $class . "\">\\\\1</span>', '\\0')", '>' . $text . '<'), 1, -1)); return $text; } Anyone out there can help getting this updated to a preg_replace_callback? Thanks
  9. Ah! Yes that is true it does show all products but splits them up in pages. I thought she meant 6000 on one page which would mean endless long scrolling. lol The MAX_ whatever limits only the products per page result and not the total amount of products. Wasn't that like that since... always. Even the old 2.2 days?
  10. Never mind my previous comment. What does it say for MAX_DISPLAY_SEARCH_RESULTS ?
  11. You say you imported your database from 2.2? The whole database structure or only certain tables? Could it be that you have the MAX_RANDOM_SELECT_NEW definition twice in there?
  12. [Contribution] Option Types v2

    @2skys One thing is sure you can't use the Option Types CUSTOMER_INPUT to do it. That is not a real value that can be calculated. You need a quantity input field of some sort. I got as far as creating 3 custom quantity input fields and then calculate the percentage of the attributes to those 3 input fields total. The main problem was once the item has been added to the cart you could not see the input fields separately listed so you as shop wouldn't know what length, width or any other dimension the customer would have chosen. That is why this is best done as attribute. You really should consider to contact multimixer and just ask how much he wants for that function he has shown in the paper printing shop. Asking is free so... Or maybe try to get a quote in the commercial support section. There again, asking is free.
  13. @puggybelle Close.... You cannot use $product_info[products_quantity] in the new_products modules. Two reasons why. 1. look at the code, all variables are like $new_products['products_id'] or $new_products['products_image'] use $new_products and not $product_info because well it is a new_products module. 2. the p.products_quantity check is not inside the new products database query so it cannot understand and check for it. Therefore we use the same function as we used in the product_listing file, tep_get_products_stock, which checks for the products_quantity. That combined with the right variable $new_products['products_id'] becomes if ( tep_get_products_stock($new_products['products_id']) >= 1) { If you want to know what the tep_get_products_stock does. Here the function code (inside general.php) //// // Return a product's stock // TABLES: products function tep_get_products_stock($products_id) { $products_id = tep_get_prid($products_id); $stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $stock_values = tep_db_fetch_array($stock_query); return $stock_values['products_quantity']; }
  14. @valquiria23 It is not compatible with Edge or Frozen version. You'll have to hard code the FILENAME_ definitions replace all the HTTP_POST_VARS and HTTP_GET_VARS and all DIR_WS. I am sure you'll have to change some of the code to match it to the latest structure.
  15. This is a Wish List Addon for osC 2.3.4 BS GOLD based on the following addon http://addons.oscommerce.com/info/8665 I didn't really "improve" the addon I just bootstrapped it and tested it with osC 2.3.4BS GOLD I couldn't find the support topic for it if anything should arise just post here. Download: (*Please read BUG message further below before using this on a real shop.) Current known bugs BUG 1: On my local shop (XAMPP) everything runs just fine but when I test it on a real server I have the following issue. When you add products to the wish list and then try to update the qunatity I get this I have no clue why and how. There is no error message or number. Something is not working properly with the update function. Again this happens only on my real server. On my local server everything runs just fine. BUG 2: This is not really a big issue (IMO) but there is a redirect function that can be switched on or off in the admin. This redirect "should" do the following; when a customer adds a product to the wish list he's supposed to be redirected back to the product_info.php. That doesn't happen. For me that is not a big issue but others might find this annoying. One solution would be to remove that setting from the admin area. If anyone could take a look at it I would appreciate it. Thanks.
  16. @puggybelle Yeah, the new osC is more modular now meaning the main file contents has been reduced to a few lines of codes to call the so called content modules to build the page. Like for example the product_info.php file, the whole contents has been split into multiple modules which put together build the product info page. The advantage of such an approach is you can change most things without touching the core code of osC which hopefully will make updates in the future a bit easier. Here my approach for the product info and product listing page. And as Malcolm already mentioned the product listing file takes care of specials and what's new as well. english.php ADD define('IMAGE_BUTTON_SOLD_OUT', 'Sold Out'); tpl_cm_pi_buy_button.php (backup file first!) Replace the whole code with this <div class="col-xs-<?php echo $content_width; ?> text-right cm-pi-buy-button"> <?php if ($product_info['products_quantity'] >= 1) { echo tep_draw_button(MODULE_CONTENT_PI_BUY_BUTTON_TEXT, '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-product-info btn-buy'); echo tep_draw_hidden_field('products_id', (int)$product_info['products_id']); } else { echo tep_draw_button(IMAGE_BUTTON_SOLD_OUT, 'fas fa-ban', null, 'primary', array('params' => 'disabled="disabled"'), 'btn-danger'); } ?> </div> product_listing.php (takes care of specials and what's new too) FIND if (PRODUCT_LIST_BUY_NOW > 0) { $prod_list_contents .= ' <div class="col-xs-6 text-right">'; $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'); $prod_list_contents .= ' </div>'; } REPLACE WITH if (PRODUCT_LIST_BUY_NOW > 0) { $prod_list_contents .= ' <div class="col-xs-6 text-right">'; if ( tep_get_products_stock($listing['products_id']) >= 1) { $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_SOLD_OUT, 'fas fa-ban', null, 'primary', array('params' => 'disabled="disabled"'), 'btn-danger'); } $prod_list_contents .= ' </div>'; } In both cases we do a simple check. If products quantity is higher or equal to 1 then show normal buy button else show sold out button. Now what you can try is to do the new products modules inside the index (tpl_cm_i_new_products.php) and index_nested (tpl_cm_in_new_products.php) modules.
  17. This module allows you to show a Horizontal Categories Menu inside the header area. This is based on G.L. Walkers code so all credits to him for this great work. FULL PACKAGE: (*no install manual included! Just drop the files in and install module through the admin area. No core code changes! ^_^ ) *Please note: To offer a horizontal menu as a general module is always difficult since it is not matching for every store. Some stores have a large amount of categories and sub-categories and therefore it might not fit. Best is always to create a "tailored" horizontal menu that fits best for your store. Some do this the hard-coded way some would like to have it dynamic. If you need such a tailored menu please ask in the Commercial Support area, thank you.
  18. @deepsonline What exactly are you looking for? Is there something particular you liked in this Bootstrap version?
  19. @puggybelle There are 2 ways of doing what you want. 1. Hard code it into every file that contains a buy button 2. Do it the way the first John showed in his example, creating a header_tags module and therefore you don't need to go change code in various files. The way to hard code it should not be much different than it was in the past. You basically check if the product has a quantity of 1 or more then show buy button else remove/deactivate button and show out of stock notification. I know redirecting you to another thread might not give you the answer right away but it will help you understand more of the code and its function. Here a thread with the same request as yours. https://forums.oscommerce.com/topic/408605-show-out-of-stock-button-in-place-of-buy-now-when-stock-is-less-than-1/#comment-1735993 Scroll down and read around Burts aswers. If you still should have a hard time getting it implemented report back and we see what we can do.
  20. [Contribution] Option Types v2

    Oh cool! I didn't know about this attributes prefix app. Sounds like it does partially what you need. Still need some debugging though. Then add an input field for attributes and you should be good? How about this one here? https://apps.oscommerce.com/p2EWu&quantity-for-product-attributes-mod Never tried it myself. So if you could get attributes prefix working with something like this quantity for attributes thing then you won't need this custom status stuff anymore since you will be able to use it as is without sacrificing the stock osC attributes drop downs.
  21. This is the support topic for the Advanced Specials Addon. http://addons.oscommerce.com/info/8294 Anything is just post here. Enjoy!
  22. [Contribution] Option Types v2

    @2skys In the admin area where the products are listed, every single product has a status setting, green for active and red for inactive. This is then used in a query to check if a product is active or not, something like ...and products_status = 1... This status function can be copied in the admin section (admin/categories.php file) and then you could use that to check for that status and if it is 1 show the custom code if it is 0 then show normal osC attributes/options. For example add that new status check inside the database query of the product info file then check for that status like this if ($product_info['custom_status'] == 1) { SHOW CUSTOM CODE } Maybe this is a bit over engineered but I always liked the possibility to switch things ON or OFF depending on product. Another thing you gotta figure out is how to multiply a value or price in attributes. Stock osC only allows you to add or subtract a certain amount but not multiply it. I'm not much of a help at the moment. I must admit I am not 100% familiar with every single osC code function and structure. Maybe try another search and look for different option possibilities? Multiply attributes price? Search result 1 Search result 2
  23. [Contribution] Option Types v2

    @2skys I see we think alike. That was the first app I had a look at after our first conversation. I got this already installed and running and as you already mentioned it removes/replaces all drop down options from the product page and replaces them with a table structure and quantity input fields. What you need though is a combination of both. I don't urge you to go get professional help, I know it can be expensive depending on the coder and work but it would be the quickest and cleanest way to do so. The other option would be to fiddle around with it till you have a break through or something that gets you close, but that is time consuming and nerve racking at times since you got to work your way into the osC code and its functions. What you can do is add another status switch in the admin section for those particular products and then in the product info page you can call for that status and then show what you need to. But still how do you get it to count Dimensions 1-3 together and then add additional attributes to it and then take over that total amount to the shopping cart? I will look further into this when time allows but don't hold your breath.
  24. [Contribution] Option Types v2

    Yep making sense. Not sure option types is the app to use though, at least not as is. The text input was made more for t-shirt or mug cup printing kinda feature. What you probably need is a quantity input field and not just one but 3 of them for dimensions 1,2 and 3 and then add additional attributes for the total of quantity 1-3. Maybe someone can custom code it for you. Perhaps multimixer is up for the task? Or you can ask once in the commercial support section? Something else... isn't square inch calculated length x width ? Just ask because in your first example you have (10.5+6=16.5" x $1.00 per square) cart shows $16.50 shouldn't it be (10.5x6=63" x $1.00 per square) = $63 Then again I am not really good at math so...
×