Jump to content

jasehead

Member
  • Posts

    213
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jasehead

  1. 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?
  2. 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
  3. 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.
  4. Sorry, I still live in a WTF is Edge world. Try a webkit browser like Chrome or Safari.
  5. 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.
  6. "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.
  7. 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.
  8. Link here (current version using font-awesome animations) The icon changes to green and pulses if the shopping cart contains any items.
  9. @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.
  10. 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>
  11. 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.
  12. 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.
  13. 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 ?
  14. The WYSIWYG CKeditor for CubeCart product descriptions tends to clean up a lot of code to comply with the DOM (it's a "feature"). I like to include some comments in the product description for my own use, like whether the postage weight is accurate or search terms so I can email links to customers that will return groups of products, eg. <!--JANUARY-SALE--> Under certain circumstances, like changing text to BOLD or even changing details in the General tab, a cleanup occurs and comment tags can be deleted. It didn't seem to happen as often if the first thing I did when editing a product was to go to the description and select source - but I wanted to guarantee that it would not happen. So I've made two changes to includes/ckeditor/config.js CKEDITOR.editorConfig = function( config ) { config.allowedContent = true; // was bottom line, now moved to top config.filebrowserBrowseUrl = document.location.pathname+'?_g=filemanager&mode=fck'; config.protectedSource.push(/{[\s\S]*?}/g); config.protectedSource.push(/<!--[\s\S]*?\>/g); // allow <comment> tag config.extraPlugins = 'showprotected'; config.filebrowserWindowHeight = 500; config.filebrowserWindowWidth = 650; }; I also noticed that where some comments HAD been deleted, the comments that remained untouched were inside <p></p> tags, so I now include comments inside paragraph tags rather than just floating by themselves. For anyone else with other kinds of code tags being deleted, try a search for config.protectedSource.push to find the regular expressions you need. If changing the CKeditor config doesn't fix the problem, try nesting your code inside tags that seem protected.
  15. My focus was at the product level - just trying to detach the secondary category from 80+ products (not delete the category). My best guess for secondary categories was the category index table. If my DELETE query won't leave a trail of severed limbs in CubeCart, great - I'll use it next time. If this has helped with other issues, also great.
  16. Not sure if you have already worked out a solution for this. I suggest using the Print Order Form payment gateway and customising that as your CASH payment option - if anyone wants to pay on pickup/delivery. PayPal Standard would allow you to process PayPal and CC for customers who prefer to pay when they place their order. I would use Store Collection for the shipping gateway and have text on your site about free home delivery for orders over $299. Not sure how you're going to be able to offer an automated discount for cash, though you could manually adjust the order through Cubecart Admin and print a new invoice to give to the customer at the pickup/delivery stage. PayPal says that you CAN charge a surcharge, but that it can not be more than what they charge you (so you would need to check PayPal's payment fee formula) https://www.paypal.com/au/webapps/mpp/ua/useragreement-full#int_11_Receiving_funds You may need to employ a CubeCart developer to tweak your checkout/gateway for the cash discount/PayPal surcharge. BEST OPTION - you could just guess your ratio of Cash vs PayPal, split the difference and raise all your prices by 2%. That way your cash payments help to subsidise your PayPal payments and the overall cost to customers is minimal - a $50 item becomes $51. As an extra thought, you might consider a mobile PayPal Here device for processing card payments in person if you don't already have a way to accept cards on site.
  17. I have a What's New category - I use this as a secondary category for new products. I also add (NEW) to the product name. So I'm at the stage where my What's New category needs a refresh and I want to remove all products from it and start fresh. First of all, I ran this SQL query to remove the (NEW) from all products: UPDATE `CubeCart_inventory` SET `name` = replace(name, ' (NEW)', '') WHERE `name` LIKE '%(NEW)%' What I want to know is - can I run this SQL query to remove all products from my What's New secondary category (105), or am I going to do other damage and should instead MANUALLY change every product (about 80+) using Cubecart admin > Products > Categories tab DELETE FROM `CubeCart_category_index` WHERE `cat_id` LIKE '105' AND primary LIKE '0'
  18. I tried raising this as an issue six months ago but was beaten down: https://github.com/cubecart/v6/issues/1162 You can have any colour you like, so long as it's black.
  19. I'm using the By Weight shipping module in Australia and have set the two option names to Express Post and Parcel Post. The problem is, these option names are used for all international zones as well. Is there any way I can set Zone 1 to Express Post and Parcel Post for Australia, and have all the other international zones display Air Mail as the option 1 name?
  20. I find refunds or partial refunds via PayPal easy to deal with - it's just a matter of including admin notes in the order to say what was done and marking the order as cancelled. However, in CCv3 it used to be possible to back out of an order to return stock to the store - from Completed to Processing (save) then Pending (save) then Cancelled (final save). In CCv6 that process triggers some confusing automated e-mails to the customer and doesn't seem to return the stock, instead there has to be a manual adjustment. That's going to leave some statistical errors too because the database may record that five hats were sold but two were returned so only three were ever sold - meaning that you could restock a product that had issues or that actually didn't sell as well as the database says it did. +1 for managed stock returns in CCv6 - even if refunds are managed through PayPal and an admin note added to the customer order. Got to wonder if there IS an API for PayPal to manage refunds though (like PrestaShop) - it would be pretty neat. But I'm used to manually generating PayPal invoices to chase lost carts, and by comparison refunds are fairly quick. Adding a new order status is possible though - search the cubecart plugins for Partially Shipped for an example of how it's done.
  21. Actually, if the page is scrolled at all the back-to-top button in CubeCart invisibly blocks clicks for the tawk.to tab (bottom right corner) and makes it non-clickable. The back-to-top button and tawk.to tab are both visible and separate, but the tawk.to tab will only be clickable if the page is at top (not scrolled, so no back-to-top button visible). This is an annoyance that should be solvable with a little code mining - maybe the size of the area for the TOP button, or z-index?
  22. Now, in By Weight there are two option names available, eg. First Class, Second Class. Any suggestions for making the first option First Class for Zone 1 and Air Mail for all other zones (so it appears that way on customer orders)?
  23. Right, fixed. If you have changed line 33 in modules/shipping/By_Weight/skin/admin.tpl (to change the 4 to a 9 for example) {for $i = 1; $i <= 4; $i++} Then you also have to change line 73 in modules/shipping/By_Weight/shipping.class.php (so you would change the 5 to a 10 - or one more than the number of zones) for($i=1;$i<5;$i++){ Now I have LOTS of countries able to purchase again (including Romania) - wonder how many sales I lost in the meantime...
  24. In Countries/Zones, Romania has it's box checked OK. Nothing wrong with the weight:price array for Zone 8 - I exploded it to see if I'd missed a comma or colon but everything is fine and no error there. All items have a defined weight. I can't tell what the customer was ordering from within CubeCart, but if they ordered the same as last year it would likely be 0.569kg. The customer's last order was in a CCv3.0.17 store which has since been upgraded to 6.0.12 - in the admin/customer page I can see there is only a single address in the address book and not separate addresses for Default Delivery and Default Billing. So I'm wondering if I set those up that it might fix the issue? Clicking through their old order, I see Romania in their address book but in the Billing and Delivery tabs the country defaults to Afghanistan - because it's the first in the list I guess. Does that always happen for old orders from earlier CubeCart versions? In any case, if I go through Admin to login as the customer, I still see Romania as the address during checkout. I tried editing the address which creates a single billing/delivery address but checkout still came back with the "no suitable delivery methods" error. I then tried to use the address book (in admin) to add a default billing address but it WOULD NOT WORK - could not successfully create another address in the address book for this customer. I could edit the existing address, but couldn't add a second address as a delivery address (which is what other customers have - a Default Billing Address and a Default Delivery Address even though these are often the same. So then I tried it through the customer's address book and I COULD add two new addresses (default billing and default delivery, same as other customers) and delete the old address. Still the same error in checkout. I could try creating a new customer, but I'm starting to think I've explored the old-address-is-screwy scenario enough to discount it. === So I tried adding RO to Zone 1 - AND IT WORKED, no error. Zone 2 - worked Zone 3 - worked Zone 4 - worked Zone 5 and onward - NO SUITABLE DELIVERY ERROR That's pretty damning - adding extra zones to the By Weight shipping module looks OK but it's not working.
×
×
  • Create New...