Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: automatic coupon based on custom field not applying #2363
    Stefano
    Participant

    HI,
    thx for your answer:

    1) yes the field name is exact
    2) i also tried with the wildcard operator and still no auto coupon applying.
    3) i con confirm the value is exactly the number 20, without any other element.
    4) i also tried using the storefront theme (WC default) and nothing happens;
    5) i deactivated all plugins except for WC, the coupon plugin and “toolset types”, the plugin i used to generate and manage the custom fields.

    nothing.

    BUT

    there’s a strange behavior from phpmyadmin: if i search the string “wpcf-sconto-automatico” from the db root, i get 2 results: but if i repeat the same search from inside the “postmeta” table and using the %LIKE% operator, i get zero results…

    as far as i can see, when i search from the root db the system by default applies a conversion to UTF-8, and this conversion is not applied in the local table search:

    so could it be a problem of encoding? to me it sounds strange, because there aren’t non-english characters in my custom field name and/or value.

    LAST THING

    if i export in mysql format the postmeta table and open it in sublime text, i find 2 occurrencies:

    (5914949, 29179, ‘wpcf-sconto-automatico’, ’20’),
    (5914574, 23746, ‘wpcf-sconto-automatico’, ’20’),

    and if i grep the string via mysqldump command on ssh i get:

    $ mysqldump -u lascienz_malpigh -p –skip-extended-insert lascienz_malpighi_2017 | grep –color=auto -w wpcf-sconto-automatico
    Enter password:
    INSERT INTO WO7deCoh_options VALUES (24588,’cpac_options_product’,’a:10:{s:5:\”thumb\”;a:8:{s:4:\”type\”;s:5:\”thumb\”;s:5:\”label\”;s:63:\”<span class=\”wc-image tips\” data-tip=\”Immagine\”>Immagine</span>\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:4:\”edit\”;s:3:\”off\”;s:6:\”filter\”;s:3:\”off\”;s:12:\”filter_label\”;s:0:\”\”;s:4:\”name\”;s:5:\”thumb\”;}s:4:\”name\”;a:7:{s:4:\”type\”;s:4:\”name\”;s:5:\”label\”;s:4:\”Nome\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:4:\”edit\”;s:3:\”off\”;s:4:\”sort\”;s:2:\”on\”;s:4:\”name\”;s:4:\”name\”;}s:11:\”is_in_stock\”;a:6:{s:4:\”type\”;s:11:\”is_in_stock\”;s:5:\”label\”;s:9:\”Magazzino\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:4:\”edit\”;s:3:\”off\”;s:4:\”name\”;s:11:\”is_in_stock\”;}s:5:\”price\”;a:7:{s:4:\”type\”;s:5:\”price\”;s:5:\”label\”;s:6:\”Prezzo\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:4:\”edit\”;s:3:\”off\”;s:4:\”sort\”;s:2:\”on\”;s:4:\”name\”;s:5:\”price\”;}s:11:\”product_cat\”;a:10:{s:4:\”type\”;s:11:\”product_cat\”;s:5:\”label\”;s:9:\”Categorie\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:4:\”edit\”;s:3:\”off\”;s:4:\”sort\”;s:3:\”off\”;s:6:\”filter\”;s:3:\”off\”;s:12:\”filter_label\”;s:0:\”\”;s:4:\”name\”;s:11:\”product_cat\”;s:20:\”enable_term_creation\”;s:3:\”off\”;}s:15:\”column-taxonomy\”;a:11:{s:4:\”type\”;s:15:\”column-taxonomy\”;s:5:\”label\”;s:9:\”Posizione\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:8:\”taxonomy\”;s:18:\”gestione-posizione\”;s:4:\”edit\”;s:3:\”off\”;s:4:\”sort\”;s:2:\”on\”;s:6:\”filter\”;s:3:\”off\”;s:12:\”filter_label\”;s:0:\”\”;s:4:\”name\”;s:15:\”column-taxonomy\”;s:20:\”enable_term_creation\”;s:3:\”off\”;}s:13:\”59fc74fa5cef8\”;a:12:{s:4:\”type\”;s:11:\”column-meta\”;s:5:\”label\”;s:11:\”Auto coupon\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:5:\”field\”;s:22:\”wpcf-sconto-automatico\”;s:10:\”field_type\”;s:0:\”\”;s:6:\”before\”;s:7:\”Sconto \”;s:5:\”after\”;s:1:\”%\”;s:4:\”sort\”;s:3:\”off\”;s:6:\”filter\”;s:3:\”off\”;s:12:\”filter_label\”;s:0:\”\”;s:4:\”name\”;s:13:\”59fc74fa5cef8\”;}s:8:\”featured\”;a:8:{s:4:\”type\”;s:8:\”featured\”;s:5:\”label\”;s:79:\”<span class=\”wc-featured parent-tips\” data-tip=\”In Evidenza\”>In Evidenza</span>\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:4:\”sort\”;s:2:\”on\”;s:6:\”filter\”;s:3:\”off\”;s:12:\”filter_label\”;s:0:\”\”;s:4:\”name\”;s:8:\”featured\”;}s:11:\”column-meta\”;a:12:{s:4:\”type\”;s:11:\”column-meta\”;s:5:\”label\”;s:14:\”Classe fiscale\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:5:\”field\”;s:10:\”_tax_class\”;s:10:\”field_type\”;s:0:\”\”;s:6:\”before\”;s:0:\”\”;s:5:\”after\”;s:0:\”\”;s:4:\”sort\”;s:2:\”on\”;s:6:\”filter\”;s:3:\”off\”;s:12:\”filter_label\”;s:0:\”\”;s:4:\”name\”;s:11:\”column-meta\”;}s:13:\”column-meta-1\”;a:12:{s:4:\”type\”;s:11:\”column-meta\”;s:5:\”label\”;s:3:\”COD\”;s:5:\”width\”;s:0:\”\”;s:10:\”width_unit\”;s:1:\”%\”;s:5:\”field\”;s:4:\”_sku\”;s:10:\”field_type\”;s:0:\”\”;s:6:\”before\”;s:0:\”\”;s:5:\”after\”;s:0:\”\”;s:4:\”sort\”;s:2:\”on\”;s:6:\”filter\”;s:3:\”off\”;s:12:\”filter_label\”;s:0:\”\”;s:4:\”name\”;s:13:\”column-meta-1\”;}}’,’yes’);
    INSERT INTO WO7deCoh_options VALUES (87274,’wpcf-fields’,’a:3:{s:19:\”immagine-per-slider\”;a:8:{s:2:\”id\”;s:19:\”immagine-per-slider\”;s:4:\”slug\”;s:19:\”immagine-per-slider\”;s:4:\”type\”;s:5:\”image\”;s:4:\”name\”;s:19:\”Immagine per slider\”;s:11:\”description\”;s:0:\”\”;s:4:\”data\”;a:9:{s:13:\”slug-pre-save\”;s:19:\”immagine-per-slider\”;s:11:\”placeholder\”;s:0:\”\”;s:18:\”user_default_value\”;s:0:\”\”;s:10:\”repetitive\”;s:1:\”0\”;s:10:\”custom_use\”;s:0:\”\”;s:19:\”conditional_display\”;a:0:{}s:10:\”submit-key\”;s:19:\”immagine-per-slider\”;s:16:\”disabled_by_type\”;i:0;s:8:\”validate\”;a:1:{s:4:\”url2\”;a:3:{s:6:\”active\”;s:1:\”1\”;s:7:\”message\”;s:60:\”Inserisci l\’indirizzo URL valido che punta al file immagine.\”;s:17:\”suppress_for_cred\”;b:1;}}}s:8:\”meta_key\”;s:24:\”wpcf-immagine-per-slider\”;s:9:\”meta_type\”;s:8:\”postmeta\”;}s:10:\”codice-ean\”;a:8:{s:2:\”id\”;s:10:\”codice-ean\”;s:4:\”slug\”;s:10:\”codice-ean\”;s:4:\”type\”;s:7:\”numeric\”;s:4:\”name\”;s:10:\”Codice EAN\”;s:11:\”description\”;s:0:\”\”;s:4:\”data\”;a:9:{s:13:\”slug-pre-save\”;s:10:\”codice-ean\”;s:11:\”placeholder\”;s:0:\”\”;s:18:\”user_default_value\”;s:0:\”\”;s:10:\”repetitive\”;s:1:\”0\”;s:8:\”validate\”;a:1:{s:6:\”number\”;a:2:{s:6:\”active\”;s:1:\”1\”;s:7:\”message\”;s:21:\”Solo valori numerici!\”;}}s:10:\”custom_use\”;s:0:\”\”;s:19:\”conditional_display\”;a:0:{}s:10:\”submit-key\”;s:10:\”codice-ean\”;s:16:\”disabled_by_type\”;i:0;}s:8:\”meta_key\”;s:15:\”wpcf-codice-ean\”;s:9:\”meta_type\”;s:8:\”postmeta\”;}s:17:\”sconto-automatico\”;a:8:{s:2:\”id\”;s:17:\”sconto-automatico\”;s:4:\”slug\”;s:17:\”sconto-automatico\”;s:4:\”type\”;s:6:\”select\”;s:4:\”name\”;s:18:\”Sconto automatico:\”;s:11:\”description\”;s:0:\”\”;s:4:\”data\”;a:6:{s:13:\”slug-pre-save\”;s:17:\”sconto-automatico\”;s:7:\”options\”;a:11:{s:60:\”wpcf-fields-select-option-8825b469ded02485e43845c7822217bc-1\”;a:2:{s:5:\”title\”;s:2:\”5%\”;s:5:\”value\”;s:1:\”5\”;}s:60:\”wpcf-fields-select-option-92f9533120aea006ec1b5d45bc01d179-1\”;a:2:{s:5:\”title\”;s:3:\”10%\”;s:5:\”value\”;s:2:\”10\”;}s:60:\”wpcf-fields-select-option-2169349f391170171c93b7234481caba-1\”;a:2:{s:5:\”title\”;s:3:\”15%\”;s:5:\”value\”;s:2:\”15\”;}s:60:\”wpcf-fields-select-option-fd3e640e341b9fa82874227731c87981-1\”;a:2:{s:5:\”title\”;s:3:\”20%\”;s:5:\”value\”;s:2:\”20\”;}s:60:\”wpcf-fields-select-option-2f37d596264d1efac4cb14ab42714fac-1\”;a:2:{s:5:\”title\”;s:3:\”25%\”;s:5:\”value\”;s:2:\”25\”;}s:60:\”wpcf-fields-select-option-b97060782ae53ecf7378ddca2cb920ef-1\”;a:2:{s:5:\”title\”;s:3:\”30%\”;s:5:\”value\”;s:2:\”30\”;}s:60:\”wpcf-fields-select-option-4e1e24b14c5eec6b1fd2d7d0e48f6d15-1\”;a:2:{s:5:\”title\”;s:3:\”35%\”;s:5:\”value\”;s:2:\”35\”;}s:60:\”wpcf-fields-select-option-f8f155e8b99d4468dbff1c6c87a7a9bf-1\”;a:2:{s:5:\”title\”;s:3:\”40%\”;s:5:\”value\”;s:2:\”40\”;}s:60:\”wpcf-fields-select-option-e953f7683443fc58e1d38a75d9dc421c-1\”;a:2:{s:5:\”title\”;s:3:\”45%\”;s:5:\”value\”;s:2:\”45\”;}s:60:\”wpcf-fields-select-option-094089d73e216283593eb6af6955a0de-1\”;a:2:{s:5:\”title\”;s:3:\”50%\”;s:5:\”value\”;s:2:\”50\”;}s:7:\”default\”;s:10:\”no-default\”;}s:10:\”custom_use\”;s:0:\”\”;s:19:\”conditional_display\”;a:0:{}s:10:\”submit-key\”;s:17:\”sconto-automatico\”;s:16:\”disabled_by_type\”;i:0;}s:8:\”meta_key\”;s:22:\”wpcf-sconto-automatico\”;s:9:\”meta_type\”;s:8:\”postmeta\”;}}’,’yes’);
    INSERT INTO WO7deCoh_postmeta VALUES (5914949,29179,’wpcf-sconto-automatico’,’20’);
    INSERT INTO WO7deCoh_postmeta VALUES (5914574,23746,’wpcf-sconto-automatico’,’20’);
    INSERT INTO WO7deCoh_postmeta VALUES (5915046,29410,’_wjecf_custom_fields’,’a:1:{i:0;a:2:{s:3:\”key\”;s:22:\”wpcf-sconto-automatico\”;s:5:\”value\”;s:2:\”20\”;}}’);

    hope these infos can help debugging 🙂

    ciao,
    s.

Viewing 1 post (of 1 total)