Jump to content

zibrnp

Members
  • Posts

    14
  • Joined

  • Last visited

Profile Information

  • First Name
    T
  • Last Name
    G

Recent Profile Visitors

172 profile views

zibrnp's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. It was my silly mistake ahhhhh It was happening like that because my apache config file had Redirect permanent to: https://shop.mydomain.com instead of https://shop.mydomain.com/
  2. I am using sandbox from PayPal and experiencing issue with URL when payment fails. When the payment fails I get this message "Sorry, we can’t complete your purchase at this time" with a button that says "Return to Store". When I click the button URL is: https://shop.mydomain.comindex.php/?controller=order&step=1&token=EC-7S820809X23746729 As you can see "/" is missing between ".com" and "index.php" How I can correct it? Thanks
  3. As mentioned earlier, when I installed PS on production server blank schema for products work without problems. As a test, I copied files from production to local box (MAMP) and now it works without problems. My local environment did not change so it would suggest that something was wrong with configuration of PS. But I am not sure what. MAMP - PHP 7.1.0 Production - PHP 7.0.19
  4. I did not find the solution only because I was getting this error on my test server. Once I configured production server everything works perfectly ok. Did you try solution by "shokinro" Thanks
  5. Hello, I am using PS 1.7 and would like to override: /themes/classic/templates/_partials/footer.tpl What is the correct way to do it? Thanks, T
  6. It was not working because in the settings of the store I did not have "use SSL" and "SSL on all the pages" set to YES. I had to go to apache settings and allow http (80) again. Then change in the settings of the store "use SSL" and "SSL on all the pages". Changed back apache to use only https and it works Thanks, hope this helps someone...
  7. I have added slash at the end of my domain in two tables: shop_url table for domain and domain_ssl configuration table for PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL Unfortunately this did not help. Thanks for suggestion. Is there anything else I can try? Thanks
  8. Hello, After installing prestashop 1.7, I go to my URL: https://mysite.domain.com and URL is changed to: https://mysite.domain.comindex.php The site does not open, I get "Server not found"... What might be the problem? Thanks, T
  9. Hello, I am trying to get blank schema for products resource and I get this error: [PHP Warning #2] Illegal string offset 'required' (.../classes/webservice/WebserviceOutputBuilder.php, line 711) Does anyone please know how to fix it? I am using prestashop 1.7.1.0 Thanks in advance.
  10. Hello, I am not sure if anyone ever is going to need it. Because the fix was so simple, below I am posting correct code. Basically I complicated it myself by adding foreach loops. By removing them code works perfect. Also in my XML example, I use first and last name "test" this is not allowed. More realistic name is necessary. Thanks $myXMLfile= 'http://localhost:8888/PHP_API/006_XML_Clients.xml'; $xml = simplexml_load_file($myXMLfile); require_once('PSWebServiceLibrary.php'); define('DEBUG', true); define('PS_SHOP_PATH', 'http://localhost:8888/prestashop/'); define('PS_WS_AUTH_KEY', 'DUJE1VTU15S31EXHNHCGG7KD7RYKSBA7'); try { $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $opt['resource'] = 'customers'; $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt); echo "Successfully added."; } catch (PrestaShopWebserviceException $ex) { $trace = $ex->getTrace(); if ($trace[0]['args'][0] == 404) echo 'Bad ID'; else if ($trace[0]['args'][0] == 401) echo 'Bad auth key'; else echo 'Other error<br />'.$ex->getMessage(); }
  11. Hello, I have XML file with new customers data and would like to add this using web services to database. My XML file with two customers looks like: <?xml version="1.0" encoding="UTF-8"?> <prestashop> <customer> <id></id> <id_default_group>3</id_default_group> <id_lang>1</id_lang> <newsletter_date_add>0000-00-00 00:00:00</newsletter_date_add> <ip_registration_newsletter></ip_registration_newsletter> <last_passwd_gen>2017-04-29 05:34:22</last_passwd_gen> <secure_key></secure_key> <deleted>0</deleted> <passwd></passwd> <lastname>test</lastname> <firstname>test</firstname> <email>kow@testde.com</email> <id_gender>2</id_gender> <birthday>0000-00-00</birthday> <newsletter>0</newsletter> <optin>0</optin> <website></website> <company></company> <siret></siret> <ape></ape> <outstanding_allow_amount>0.000000</outstanding_allow_amount> <show_public_prices>0</show_public_prices> <id_risk>0</id_risk> <max_payment_days>0</max_payment_days> <active>1</active> <note></note> <is_guest>0</is_guest> <id_shop>1</id_shop> <id_shop_group>1</id_shop_group> <date_add>2017-04-29 11:34:22</date_add> <date_upd>2017-04-29 11:34:22</date_upd> <reset_password_token></reset_password_token> <reset_password_validity>0000-00-00 00:00:00</reset_password_validity> <associations> <groups> <group> <id>3</id> </group> </groups> </associations> </customer> <customer> <id></id> <id_default_group>3</id_default_group> <id_lang>1</id_lang> <newsletter_date_add>0000-00-00 00:00:00</newsletter_date_add> <ip_registration_newsletter></ip_registration_newsletter> <last_passwd_gen>2017-04-29 05:34:22</last_passwd_gen> <secure_key></secure_key> <deleted>0</deleted> <passwd></passwd> <lastname>test2</lastname> <firstname>test2</firstname> <email>kow2@test.com</email> <id_gender>1</id_gender> <birthday>0000-00-00</birthday> <newsletter>0</newsletter> <optin>0</optin> <website></website> <company></company> <siret></siret> <ape></ape> <outstanding_allow_amount>0.000000</outstanding_allow_amount> <show_public_prices>0</show_public_prices> <id_risk>0</id_risk> <max_payment_days>0</max_payment_days> <active>1</active> <note></note> <is_guest>0</is_guest> <id_shop>1</id_shop> <id_shop_group>1</id_shop_group> <date_add>2017-04-29 11:34:22</date_add> <date_upd>2017-04-29 11:34:22</date_upd> <reset_password_token></reset_password_token> <reset_password_validity>0000-00-00 00:00:00</reset_password_validity> <associations> <groups> <group> <id>3</id> </group> </groups> </associations> </customer> </prestashop> Above XML file is accessible on my localhost via: http://localhost:8888/PHP_API/006_XML_Clients.xml PHP file that is suppose to handle everything looks like: ini_set('display_errors', 1); $myXMLfile= 'http://localhost:8888/PHP_API/006_XML_Clients.xml'; $xml = simplexml_load_file($myXMLfile); $customers = $xml->customer; require_once('PSWebServiceLibrary.php'); define('DEBUG', true); define('PS_SHOP_PATH', 'http://localhost:8888/prestashop2/live_site_local/www/'); define('PS_WS_AUTH_KEY', 'DUJE1VTU15S31EUHNHCGG7KD7RYKSBA7'); foreach ($customers as $resources) { $xml = $resources; try { $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); $opt['resource'] = 'customers'; $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt); echo "Successfully added."; } catch (PrestaShopWebserviceException $ex) { $trace = $ex->getTrace(); if ($trace[0]['args'][0] == 404) echo 'Bad ID'; else if ($trace[0]['args'][0] == 401) echo 'Bad auth key'; else echo 'Other error<br />'.$ex->getMessage(); } } When I run this code I get error that: <error><code><![CDATA[41]]></code><message><![CDATA[parameter "passwd" required]]></message></error> Even if I try to enter pass it is not working. I am not sure what is wrong, If someone has idea and can help, please. Maybe I have wrong approach. Thanks, T
  12. I had an idea that I can use MySQL Triggers to update ps_product_shop.active to 0 after product is added to the cart. But this is not going to work since cart checks if product is available and displays red error when is not. Is there another way to I can put on hold item added to the cart?
  13. I would like to make the product unavailable for purchase for 15min when client adds it to the cart. Is there a module that will allow me to do it? Regards
×
×
  • Create New...