Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.


Popular Content

Showing content with the highest reputation on 02/25/2019 in all areas

  1. 1 point
    Uhm. Core Updater is not made to update developer installations, just like tbupdater wasn't. Branch markus is where I push my current work. Often intentionally broken stuff, to test/improve Travis CI. Workflow goes like this: http://jump-ing.com/traumflugs/github_best_practices#avoid_broken_code_on_the_main_branch
  2. 1 point
    And also, for anyone reading this thread: The caveat or note with this solution is that it Nukes / deletes all Features pertaining to this product - and not just the ones that you're updating. This means that you will need to 'replace' all the product's features when doing an update - you can't just do an update on one feature only. So if you have 4 features on a product and only want to update 1, then you will need to remember to include all 4 features, and not just one in the CSV import when doing an update. If you only have one feature, then it will delete the other 3, and only import 1. This entire solution is geared to adding "updating feature values" with CSV Import to this free module (the module enables TB to have features with multiple values). https://github.com/jdanthinne/advancedfeaturesvalues If you're not using this module or do not need to update features with multiple values using CSV Import, then this solution is not necessary, as TB updates feature values (one value per feature) on import without needing to change any code. It's just with "multiple values per feature" that there is a problem. However, if you are using this module and need to update feature values when doing a CSV import, in \controllers\admin\AdminImportController.php file: you need to add the following (the part in bold) just after "if (!$validateOnly && isset($features['features']) && !empty($features['features'])) {" // Features import $features = get_object_vars($product); if (!$validateOnly && isset($features['features']) && !empty($features['features'])) { if ($forceIds || $matchRef) { $product->deleteFeatures(); } This deletes the target product's features and replaces it with what is specified in the CSV. Full credit to @Jonny for the solution to this problem, obviously 🙂
  3. 1 point
    Hi Jonny This is so strange - probably one of those weird formatting issues... I copied the code directly from the file (and not from your example) and added $product->deleteFeatures(); And now it works! (on initial tests anyway) Weird... I appreciate the reply back and solution, thank you. Will let you know if I encounter any issues with this during more thorough tests... (oh and the text editor I'm using is Sublime Text)
  • Create New...