Jump to content

yeye412

Members
  • Posts

    34
  • Joined

  • Last visited

Profile Information

  • Location
    Caltagirone
  • First Name
    Yessine
  • Last Name
    Kebir

Recent Profile Visitors

754 profile views

yeye412's Achievements

  1. Hi, after the installation of the module ps_accounts (requested during the installation of the one_page_checkout module), i was not able to access the back office due to an error on the back office page. As i'm wasn't able to login to the back office, i tried to delete manually the ps_accounts module from /module folder and remove it's references from db (ps_module, ps_module_group, ps_module_country, ps_hooks_module, ps_module_preference, ..). From that time, i'm getting the ERR_TOO_MANY_REDIRECTS error on the back office page. Does someone have any idea on how to fix it or what could be the cause? Sadly we've not any recent backup, so we cannot rollback all. The only error i can see on the errors.log file is: [04-Jul-2023 04:06:03 America/Chicago] PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Shop given in /home2/mainuser/public_html/src/Adapter/EntityMapper.php:99 Stack trace: #0 /home2/mainuser/public_html/src/Adapter/EntityMapper.php(99): array_key_exists('id_shop', Object(Shop)) #1 /home2/mainuser/public_html/classes/ObjectModel.php(264): PrestaShop\PrestaShop\Adapter\EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /home2/mainuser/public_html/classes/shop/Shop.php(128): ObjectModelCore->__construct('1', NULL, NULL) #3 /home2/mainuser/public_html/classes/shop/Shop.php(413): ShopCore->__construct('1') #4 /home2/mainuser/public_html/config/config.inc.php(119): ShopCore::initialize() #5 /home2/mainuser/public_html/index.php(27): require('/home2/mainuser...') #6 {main} Thank you in advance for helping! SOLVED After hours, i was able to solve the issue.. I was missing to remove ps_account module references on the ps_tab db table. Hope this will help someone
  2. Hi, is there a way to allow or deny orders by using availability date field? I want to do this change to enable Pre order products cart, for example i want to allow orders on certain product from 30/03/2022 then i have to edit code to set automatically "Allow orders" field enabled from 30/03/2022. I tried to search on PS forum without success, i hope someone can help me. Thank you in advance
  3. Yes I know directory navigation and I set correctly path. Why it works with no including init.php? Maybe script doesn't need it (?) for this reason I commented it at this moment.
  4. Hi @Guest, i tested it , first time it doesn't work , i don't know why , but include('./init.php'); broke the script. If someone has problems just have to remove init include , because script seems doesn't need init.php for work. I want to thanks again to Tengler and will set post as SOLVED .
  5. There's no description /description short and i want to import all in main category (Home).. At this moment it's a simple php script , i can add anytime all product attributes. Problem is on import action by curl now ..
  6. If you read php script you can understand csv structure reference;name;price;quantity; This is csv header.
  7. I forgot to add some details on csv import script. I'm trying to import only simple products (no combination) without images . In attach php script. if (!defined('_PS_ADMIN_DIR_')) define('_PS_ADMIN_DIR_', __DIR__); require_once (_PS_ADMIN_DIR_.'/class.PSRequest.php'); /* DB Config */ $shopID = "1"; $adminUrl = '...'; $adminLoginEmail = '...'; $adminLoginPass = '...'; $request = new PSRequest(); $request->setCookieFileLocation(__DIR__.'/PScookie.txt'); $request->setPost(array("email" => $adminLoginEmail,"passwd" => $adminLoginPass, "submitLogin" => "Connexion")); $request->call($adminUrl."/index.php?controller=AdminLogin"); $request->call($adminUrl."/index.php?controller=AdminImport"); list(,$response) = explode("\r\n\r\n", $request->_webpage, 2); preg_match("/token=([a-z0-9]+)/", $response, $matches); $token = $matches[1]; $request->setPost(array( "controller" => "AdminImport", "token" => $token, 'skip' => '1', 'csv' => 'prodotti.csv', 'entity' => '1', 'separator' => ';', 'multiple_value_separator' => ',', 'iso_lang' => 'it', 'match_ref' => '1', 'regenerate' => '0', 'sendemail' => '1', "type_value" => array( 0 => 'reference', 1 => 'name', 2 => 'price', 3 => 'quantity' ) ) ); $request->call($adminUrl."/index.php?controller=AdminImport&token=".$token); $request->call($adminUrl."index.php?ajax=1&action=import&tab=AdminImport&offset=0&limit=5&token=".$token); echo "called AdminImport and POST datas..."; //TEST PURPOSE //write response output on file $file = fopen("importProducts.log", "w"); fwrite($file, $response); $request = null; ?> I'm not php programmer and don't know Prestashop project structure, i'm studying php and prestashop for this reason need some help.. I can understand most of online code, and can reuse php scripts .. i think problem is that don't know very good php e prestashop, problem it's not money (i can pay anyone for doing this code) i want only support and do it alone. If you can help me i'll thank you, if no it's ok . Regards
  8. Hi Tengler, thank you for reply. I just used search for many days but I didn't found nothing for 1.7 vs. I didn't understand your solution, if already exist can you share me some existing examples on web ? Because I know web service solution and it's different , I don't have to login in administration panel to get token but I've to use generated key in webservice menu (I already use it for export products). In this case I'm trying to importing by calling import controller action as backoffice import page do, the only difference is the automation. Thanks again for support
  9. Hello everyone, i'm facing an issue by using an Import CSV php script (i run this script every 5 hour by cron) that connect user in admin page and import csv file inside certain folder. Prestashop version: 1.7.6.1 Steps: 1) $request->setPost(array("email" => $adminLoginEmail,"passwd" => $adminLoginPass, "submitLogin" => "Connexion")); $request->call($adminUrl."/index.php?controller=AdminLogin"); 2) $request->call($adminUrl."/index.php?controller=AdminImport"); list(,$response) = explode("\r\n\r\n", $request->_webpage, 2); preg_match("/token=([a-z0-9]+)/", $response, $matches); $token = $matches[1]; 3) $request->setPost(array( "controller" => "AdminImport", "token" => $token, 'skip' => '1', 'csv' => 'prodotti.csv', 'entity' => '1', 'separator' => ';', 'multiple_value_separator' => ',', 'iso_lang' => 'it', 'match_ref' => '1', 'regenerate' => '0', 'sendemail' => '1', "type_value" => array( 0 => 'reference', 1 => 'name', 2 => 'price', 3 => 'quantity' ) ) ); 4) curl to --> /index.php?controller=AdminImport&token=xxx" All steps return a 200 http status , and i can see token got by admin login but anything was imported in my shop. Step 4 response is the html content of the admin import page, i think there's a problem on import csv action.. Can anyone help me please? Thanks a lot.
  10. Bonjour! J'ai un problème avec mon e-commerce Prestashop, avec la version 1.6.1.7. Le problème est sur la fonction Combination, quand j'active cette fonction du Back Office, sur ma page d'accueil, le prix d'un lot de mon produit sera de 0 €. Quand je la désactivez, tous le prix reviennent à droite.. Pouvez-vous m'aider s'il vous plaît!? Merci !
  11. Buona sera a tutti, in questi giorni ho avuto un paio di problemi con il mio negozio online.. Praticamente ho un prodotto con combinazioni che perde il valore di impatto prezzo, tornando dopo qualche ora al prezzo di base. Il prodotto in questione ha il prezzo di 3 euro tasse incluse, ha 5 combinazioni con impatto prezzo: 0,99 - 0,30 e 0 (quindi uno dei 5 prodott rimane a 3 euro). Salvato il prodotto, funziona tutto per il meglio.. Passate un paio di ore, tutti i prodotti costano 3.00 , quindi l'impatto prezzo di ogni combinazione si annulla. Qualcuno può aiutarmi? Grazie mille EDIT: Controllando sul database , nella tabella delle combinazioni ho trovato diverse combinazioni assegnate a prodotti con id 0 , o combinazioni mezze complete.. Le ho eliminate.. Potrebbe essere questo il problema??
  12. Bonjour a tous.. J'ai un problem avec le prix de les combinaisons de un produit. Il a le prix de 3 euros avec tax, a 5 combinaisons avec impact prix: 0.99 - 0,99 - 0.30,0.30 et 0 (l'un des 5 produits reste donc à 3 euros). Je Sauvé le produit, il fonctionne.. Au bout de quelques heures, tous les produits coûtent 3,00 €, donc l'impact sur les prix de chaque combinaison est annulé. Quelqu'un peut m'aider? Merci infiniment
  13. Hello guys, do you know How can i show weight of the order in shopping cart?? I've set delivery with weight , and i want to show to buyer total price of his cart. Thanks! PS: If there's a way to show weight on product page please help me.
×
×
  • Create New...