• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About jasehead

  1. Radio buttons for shipping on checkout

    I want the postage estimates displayed because most of my customers are local. However, I'm not sure why overseas customers have slipped through with local shipping rates. Seems to be the last two (since 13 June), all the previous overseas sales seem to have the correct shipping. My checkout has been modified for radio buttons - which is why I posted here (modifications are discussed in this thread). The radio button code changes may have caused the shipping rates to not be updated as the customer completed their details, or it may happen on a vanilla Foundation store - I don't know. I'm still using 6.0.12 (still waiting on some features before upgrading). The radio button code has been in operation since Aug 2016, so there must be another fail point.
  2. Radio buttons for shipping on checkout

    I've noticed a couple of overseas orders slipping through on local rates lately. I'm thinking that if the customer is logged in that their country is recognised and they get the correct shipping, but if the customer is new and just filling out their details then the postage (already quoted at the local rate) may not be getting updated for their country. Is there an extra check I can activate when the customer changes the country while they fill out their details?
  3. Sale for items on sale

    Keat posted this as a feature request on GitHub on 05 Sep 2016 - Issue #1222 Yes, it would help to have a checkbox to NOT apply global discount to already discounted items, but cubecart could simply test for whether the manual discount or the global discount is less and just apply the lowest price for that item. I notice that Al closed the issue in early May 2017, but there is no indication that it was implemented at all. I get the feeling that a lot of cobwebs in Cubecart's GitHub were cleared out in May and that a lot of issues and requests were trashed. But it is still listed in the Request a Feature voting page (although I placed a third vote from Dirty Butter's link above and when I searched through the list it only had one vote and a slightly different link): https://features.cubecart.com/topic/feature-request-exclude-items-on-sale-from-global-sale-mode_8
  4. The current Font Awesome animation for making the shopping cart icon repeatedly pulse larger and smaller (if basket contains item) works for current Mac and Android versions of Safari, Chrome and Firefox. Untested on Windows Edge. The move to SVG animation will be part of a larger store upgrade, so will be a while before I have anything to show.
  5. Sorry, I still live in a WTF is Edge world. Try a webkit browser like Chrome or Safari.
  6. Try a different browser or a smartphone to see if the effect is different. This is just using the font-awesome-animate javascript library, so any limitations are either with that or with my IF $CONTENTS > 0 statement for the animation effect.
  7. fuzzy search

    "We Recommend" won't work in my case - I want to be able to make as many links to custom search results as I like (for instance, grouping three product designs together but only showing a specific size - sizes are separate products in my store so it's easy). If I want to search for a secret tag then I can just put that in <!--comments--> in the product description and my search will pick it up OK. Like I said, my custom search using AND, OR & NOT is working just fine in 6.0.12 with only a syntax error (an extra AND) but that doesn't cause it to fall over - just have to get it working for 6.1.5. My search is very specific and shows only the desired products without further items. If I check my search log and see that people are searching for particular words or phrases that clearly wouldn't return good results, then that's a cue to me to improve my copy text for SEO - which is probably good practice anyway.
  8. fuzzy search

    Searching for specific products... Basically, I wanted PRECISE search results that were restricted to only the items I wanted to show to customers so that I could send a link (or a shortened version via bit.ly). If I want to advertise five specific items then I can provide a link to search results for those specific items. Or, if a customer asks for help with choosing then I can provide a link to recommendations based on their requirements. I didn't want a trailing list of other "relevant" items in the search results, and I wanted to be able to use AND, OR and NOT to further refine search results. My current 6.0.12 attempt DOES work (despite filling the error log) and, for me, is an improvement on the original relevant search which didn't behave the way I wanted it to.
  9. Link here (current version using font-awesome animations) The icon changes to green and pulses if the shopping cart contains any items.
  10. fuzzy search

    @bmither - It's been 12 months and the default search code in CubeCart 6.1.5 is very different to what it was in 6.0.12. In 6.0.12, searching by relevance did not allow me to restrict a search to specific products - I haven't yet tested 6.1.5 to see how search has changed, but I expect the modifications discussed here will still need to be implemented in some way. Could you please check this modified 6.0.12 search code from catalogue.class.php and suggest how to implement it for 6.1.5? Around 1413: public function searchCatalogue($search_data = null, $page = 1, $per_page = 10, $search_mode = 'like' /* 'fulltext' */) { // search changed from fulltext to like And this is the lump of search code starting around 1604: /* START modified search } elseif ($search_mode == 'fulltext') { return $this->searchCatalogue($original_search_data, 1, $per_page, 'like'); END modified search */ } } else { $this->_sort_by_relevance = false; /* START modified search $rlike = ''; if (!empty($search_data['keywords'])) { $searchwords = preg_split( '/[\s,]+/', $GLOBALS['db']->sqlSafe($search_data['keywords'])); foreach ($searchwords as $word) { $searchArray[] = $word; } $noKeys = count($searchArray); $regexp = ''; for ($i=0; $i<$noKeys; ++$i) { $ucSearchTerm = strtoupper($searchArray[$i]); if (($ucSearchTerm != 'AND') && ($ucSearchTerm != 'OR')) { $regexp .= '[[:<:]]'.$searchArray[$i].'[[:>:]].*'; } } $regexp = substr($regexp, 0, strlen($regexp)-2); $rlike = " AND (I.name RLIKE '".$regexp."' OR I.description RLIKE '".$regexp."' OR I.product_code RLIKE '".$regexp."')"; } END modified search */ if (!empty($search_data['keywords'])) { $rlike = ' AND ( '; $searchwords = preg_split( '/[\s,]+/', $GLOBALS['db']->sqlSafe($search_data['keywords'])); foreach ($searchwords as $word) { $searchArray[] = $word; } $noKeys = count($searchArray); for ($i=0; $i<$noKeys; ++$i) { $ucSearchTerm = strtoupper($searchArray[$i]); if ( ($ucSearchTerm != 'AND') && ($ucSearchTerm != 'OR') && ($ucSearchTerm != 'NOT') && (strlen($ucSearchTerm) > 0) ) { $searchArray[$i] = str_replace(array('%','_'), array('\%','\_'), $searchArray[$i]); $regexp = '%'.$searchArray[$i].'%'; $rlike .= "(I.name LIKE '".$regexp."' OR I.description LIKE '".$regexp."' OR I.product_code LIKE '".$regexp."')"; // modified search - name, description, product code $rlike = str_replace(array(')(',') NOT ('), array(') AND (',') AND NOT ('), $rlike); // modified search - add AND between words and cope with NOT // if($i+1 < $noKeys){$rlike .= " AND ";} // modified search - add AND between words (line disabled) } else { if(strlen($ucSearchTerm) > 0){ $rlike .= " ".$ucSearchTerm." "; } else { $rlike .= " AND "; // THIS LINE IS NOT WORKING } continue; } } $rlike .= " )"; $rlike = str_replace(') AND )',')', $rlike); // modified search - added to fix trailing AND (still a problem) } // if(!$order_string){$order_string = 'ORDER BY stock_level DESC';} // modified search if(!$order_string){$order_string = 'ORDER BY stock_level DESC, IF (G.sale_price IS NULL, IF (I.sale_price = 0, I.price, I.sale_price), IF (G.sale_price = 0, G.price, G.sale_price)) DESC';} // modified search - order by stock first, then sale price $q2 = "SELECT I.* FROM ".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_inventory AS I LEFT JOIN (SELECT product_id, MAX(price) as price, MAX(sale_price) as sale_price FROM ".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_pricing_group $group_id GROUP BY product_id) as G ON G.product_id = I.product_id $joinString WHERE I.product_id IN (SELECT product_id FROM `".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_category_index` as CI INNER JOIN ".$GLOBALS['config']->get('config', 'dbprefix')."CubeCart_category as C where CI.cat_id = C.cat_id AND C.status = 1) AND I.status = 1 ".$whereString.$rlike." ".$order_string; // END modified search $query = $q2.' '.$limit; if (($search = $GLOBALS['db']->query($query)) !== false) { $count = $GLOBALS['db']->query($q2, false, 0); $this->_category_count = (int)count($count); $this->_category_products = $search; return true; // START modified search } elseif ($search_mode == 'like') { return $this->searchCatalogue($original_search_data, 1, $per_page, 'fulltext'); // END modified search You may notice that I'm still having issues with a trailing AND in the search string - it throws errors but the search works. The goal is to search for words or parts of words in name, description and product code. Operators like AND, OR, NOT all work OK (and in combination) and searching for a phrase like black ducks returns results for black AND ducks rather than "black ducks" as a strict phrase. Any constructive suggestions are welcome.
  11. Because CubeCart dropped font-awesome in favour of SVG - any CSS animation suggestions/libraries that will animate a pulsing shopping cart icon like this in box.basket.php? (For this to work, requires these CSS files and the following links in main.php) <link href="{$STORE_URL}/skins/{$SKIN_FOLDER}/css/font-awesome/css/font-awesome.min.css" rel="stylesheet"> <link href="{$STORE_URL}/skins/{$SKIN_FOLDER}/css/font-awesome/css/font-awesome-animation.min.css" rel="stylesheet"> These are my lines in box.basket.php (CubeCart 6.0.12) that change the colour and pulsate the font-awesome shopping cart icon if the cart contains something: <div class="text-right"><a href="#" id="basket-summary" class="button white small"><span style="{if isset($CONTENTS) && count($CONTENTS) > 0}color:green;font-size:1.10rem;{/if}"><i class="fa fa-shopping-cart{if isset($CONTENTS) && count($CONTENTS) > 0} faa-pulse animated{/if}"></i> {$CART_TOTAL}</span></a></div> and <div class="show-for-small-only"><a class="right-off-canvas-toggle button white tiny" href="#"><span style="{if isset($CONTENTS) && count($CONTENTS) > 0}color:green;{/if}"><i class="fa fa-shopping-cart fa-2x{if isset($CONTENTS) && count($CONTENTS) > 0} faa-pulse animated{/if}"></i></span></a></div>
  12. Also noticed bots in the Customer Access Log (Admin > Advanced > Staff Access Log then Customer Access) - easy to pick these bots because they try using a name rather than an e-mail address and have a big red X. I checked a lot of IP addresses to get a pattern, and so far I've blocked Russia, Ukraine, Israel and Slovenia plus a few individual IPs from countries where I have customers - seems to have made a big difference.
  13. Have the ability within CubeCart to allow or block countries by a simple checkbox. Ticking the checkbox would modify the .htaccess file with a DENY FROM list of IP addresses for that country. This could be useful for reducing exposure to hackers, spammers and nuisance phone calls. Online sellers have a feel for where most of their good customers are located, so blocking nuisance countries can save a lot of wasted time and worry. IP country lists can be found online, eg. http://www.ipdeny.com/ipblocks/ Some thought may have to be given to search engine spider IPs and content delivery networks. Maybe also consider performance issues if too many countries blocked using this method.
  14. I just exported a copy of my cubecart database prior to fiddling/upgrade and was browsing through when I noticed things like this in the CubeCart_search table: HTTP://SVZTGXEPMYEU.COM/ - or other random letter url always the same length (these were early on in the list so I expect they're old) SLEEP(3) - often as part of a longer string like '2015&#39;&AMP;&AMP;SLEEP(3)&AMP;&AMP;&#39;1' BENCHMARK(2999999 MD5(NOW())) &AMP;#1575;&AMP;#1604;&AMP;#1605;&AMP;#1610;&AMP;#1585;&AMP;#1594;&AMP;#1606;&AMP;#1610; - or part/similar \\&QUOT;X\\&QUOT;=\\&QUOT;X - or - &#39;X&#39;=&#39;Y - or similar KM;L&#39;/;M&#39;/ SIDIVYA;VIDEOXXX;X I'm not sure what they might be sniffing for, but the MD5 suggests they are looking for a password weakness in the HTML output - and I guess they're testing if the search function mines the page code and not just the displayed text.
  15. I didn't want to delete the "What's New" category, just empty it. Using phpMyAdmin to run the SQL would bypass CubeCart having any say about deleting the secondary links in the index - unless it growls at me later. CubeCart safeguards against deleting a category (using CubeCart admin > Categories) that contains primary products so that there are no orphaned products as a result, but if all products were secondary it should be allowed. I'd still suggest that subcategories be protected - products gone but subcats remain - so the category could only be successfully deleted if no subcats. Much easier to move a few categories than hundreds of products. I understand that deleting the "What's New" category and reconstructing it would be a quick fix, but I'd have to make sure I didn't make other errors reproducing it. Anyway, next time I want to clear it out I'll backup the database, run the DELETE query and report back. Thanks for your time on this ?