Jump to content
  • Posts

    58
  • Joined

  • Last visited

Profile Information

  • Activity
    Web development agency

[email protected]'s Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. We have a Prestashop 1.5.6 installation we manage, and we've been fine with using capistrano to manage our deployments to both our live and test servers. I'm trying to refine our workflow, as we've got the entire prestashop installation stuck into our git repository, along with every module that we've written, of which there are about 9. Does anybody follow a deployment workflow whereby Prestashop core is pulled from the Prestashop Github repository, and custom modules built as separate Git submodules? I'm looking at creating a parent Git repo, with the Prestashop repository as a submodule, and then with our custom Prestashop modules, as submodules inside the modules folder. What is the best way to set this up? If I can refine the question even further, here's how I see the folder structure looking like: myproject - .git - prestashop (https://github.com/PrestaShop/PrestaShop.git) - ... - modules - ... - my_module_1 (Git submodule 1) - my_module_2 (Git submodule 2) - my_module_3 (Git submodule 3) I'm thinking I'll have a parent project, myproject, with the submodules added to prestashop/modules. If I commit the above, will I be able to do a git clone, and all the repositories clone with the entire project?
  2. I've created a Prestashop module with a table that needs to be exposed to our clients. This exposure needs to happen through the Prestashop web services, just like every other model entity in Prestashop is made available via REST. I've created the required code that allows me to assign the appropriate GET, POST, PUT, DELETE and HEAD HTTP method permissions for the resource. Our clients are able to access the module table using GET requests via the Prestashop web services, but PUT does not seem to work at all. Prestashop developer documentation in terms of web service implementation seems non-existent, besides a few guides on how to use the existing core web services. I need to add some business rules to the update method for when we receive PUT requests from our clients. So trying to add an updateWs method to my model class Some of the core Prestashop model classes that extend ObjectModel include an objectMethodsmember inside their $webservicesParameters array, which points to a method in the model class. class SomeModel extends ObjectModel //... protected $webserviceParameters = array( 'objectMethods' => array( 'add' => 'addWs', 'update' => 'updateWs' ), // ... I tried the above technique in my model class, added the updateWs method like such: public function updateWs() { echo 'Check bizz rules, and save'; exit; } The problem is, this code never gets hit? Any ideas what could be the issue? I simply get a HTTP 200 response from Prestashop with the following in the body: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink></prestashop>
  3. It's a bit concerning to see that no one has bothered to reply to your question. I have a similar query, and no matter how much I search about, I just can't find documentation to create new web services for custom tables or entities that we might want to add to our modules. Could anyone please offer some insight into this, it's been almost two months since the original poster asked his question, and with the hordes of Prestashop contributors out there, surely someone must have some advice. mreahnali, have you been able to make some progress on your own attempts? We'd love to know how.
  4. I'm looking into utilising the Prestashop Web Service feature to expose some tables to our clients. We have a custom table in our implementation that contains additional information in relation to print job specifications our product customization utility creates. I've enabled web service for our stores, and created an API key, and I'm able to access some of the standard web services via HTTP requests. Works like a bomb! However, I'd like to be able to expose my custom table via a web service like the other stuff in Prestashop, but I'm failing to find documentation online on how to do this? Any ideas where I can find instructions? We're using Prestashop 1.5.4
  5. From which version do you have to upgrade? I started at my current company about 5 months ago and I got tasked to upgrade our PrestaShop installation. I had to go from version 1.5.0.9. Our setup is highly custom, we have built plugins for Facebook authentication, as well as a Flash embedding module that allows our users to customise their products. We also have plugins created for direct PayPal payments and about 5 more modules custom to our business. The problem was, the code base I inherited had a lot of bad gremlins I needed to sort out. Modules weren't really modules, the PS core was hacked, modules needed to be decoupled from the PS core, and there was crap loads of redundant, copy pasted code, that got out of sync with bug fixes not applied to all of the copy pasted blocks. I had to rewrite, refactor and fix loads of issues, abstract the redundant bits into more reusable portions, modularize the fragmented modules etc. So kromiko, with upgrading PrestaShop, I totally feel your pain! Fortunately from this point on, it should be smoother sailing with the 1-Click upgrade plugin.
  6. Sure thing. Take a look in your config files. It should be defines.inc.php, you need to make sure that the line reading define('_PS_JQUERY_VERSION_', '1.7.2'); is reflecting the correct jQuery version. Take a look inside your ./js/jquery folder to determine which jQuery is available. If you've upgraded do v1.5.4.1, the line above should fix your problem.
  7. I've built a tiny module for PrestaShop that allows us to show all products on a page, using a query specific to our needs, and so far things look fairly ok. https://newstore.personera.com/7J0A1B83X2D7/ I want to take things further a bit and allow us to show products by categories using a URL looking something like follows: https://newstore.personera.com/the_shop/category/the_category but off course this will cause a 404 error right of the bat. The other cheap alternative is to use a query to access it like this: https://newstore.personera.com/the_shop?category=the_category but I think this looks cheap, and isn't SEO friendly. How do I go about getting PrestaShop to redirect the URL to the same front controller, which will take the /category/the_category URL sections into consideration when it fetches results from the database?
  8. The live site reads newstore.personera.com, apologies but it seems I copied my development machine virtual host config, which is essentially exactly the same as the test site, except for the file paths and server names. The virtual host has been activated, otherwise I wouldn't see the home page as I previously mentioned, however the site is in limbo at this point in time. The double quotes are a bad habit I have, and is needed when you have spaces in your paths (a very bad practice which I avoid at ALL costs). The double quotes don't invalidate the Virtual Host setup in any way, but I guess it's a bit cleaner without them. I'm moving the site to a more appropriate testing server where I can go nuts with the setup. So far I've installed a fresh copy of PrestaShop 1.5.4.1 and installing our custom modules one by one to determine where the problem could potentially be. I've also found a LOT of overrides written by my predecessors where I work now, so moving those into corresponding modules where they belong. Prestashop needs to modify the overrides upon module (un)installation.
  9. Hi guys, sorry for the issue there yaniv14, I'm busy redoing the server setup on a different EC2 machine, os that link is offline for now. Nonetheless, here's my virtual host setup: NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot "/..." <Directory "/..."> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName newstore.personera.dev DocumentRoot "/.../newstore.personera.dev" ErrorLog "/.../newstore.personera.dev/log/errors.log" CustomLog "/.../newstore.personera.dev/log/access.log" common LogLevel debug <Directory "/.../newstore.personera.dev"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </VirtualHost> <IfModule mod_ssl.c> <VirtualHost *:443> ServerName newstore.personera.dev DocumentRoot "/.../newstore.personera.dev" ErrorLog "/.../newstore.personera.dev/log/ssl-errors.log" CustomLog "/.../newstore.personera.dev/log/ssl-access.log" combined LogLevel debug <Directory "/.../newstore.personera.dev"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> SSLEngine on SSLCertificateFile /.../server.crt SSLCertificateKeyFile /.../server.key </VirtualHost> </IfModule>
  10. Turning it off, and hitting Preview link from the backend gives a bit of info: What baffles me, is it doesn't happen on my localhost development setup?
  11. Hi guys, to answer your questions. Home page for shop (multistore) are working okay. However, when clicking through to a product, I get the 404. Here's an example store, ignore the broken images, I'm still busy finishing moving our assets to Amazon S3 and CSS needs to be finished as well. http://newstore.pers...m/7J0A1B83X2D7/ When I visit for example: http://newstore.pers...all-poster.html I also tried the product Preview link from backend, none works. Tried multiple stores, but all of them complain. the thing blows up in my face miserably. Backend is working 100%. I'm going to try disabling all unnecessary plugins, disable all our overrides and see if the problem lies there somewhere. Also thinking about grabbing a new Prestashop installation, and bringing our modules accross, and plugins. We've been busy trying to upgrade our v1.5.0.9 to v1.5.4.1 for weeks now, and finally got to the stage where everything seems to work ok, on my local dev machine at least.
  12. Whenever I visit a any of our products, across all our stores, I'm getting a 404 error: "Page not available" I'm using Prestashop 1.5.4.1 and have tried for hours now to get things back and running. I tried clearing the cache by turning Caching off and Force Compilation on in the Performance page. I also deleted the .htaccess file, turned Friendly URLs off, and back on to have PrestaShop regenerate the file. NOTHING I'm trying seems to work!!! The only hint of an error I'm getting, when I visit for example http://newstore.ourcompany.com/7J0A1B83X2D7/en/home/94-product-seo-name.html (...and the above is a link I got by clicking "Preview" on the product admin page...) is inside a PHP error log file stating: File does not exist: /var/www/newstore.ourcompany.com/current/en where ./current is the public folder containing PrestaShop, and managed by Capistrano. Dunno why it's trying to find a physical /en folder? I also checked my virtual host configuration and tried to determine if something is wrong there, but everything seems in order? Any help would be highly appreciated!
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More