I want to use custom payment method in prestashop - module

I am using prestashop for my online shop. I want to use custom payment option. feature would be similar like cash on delivery. what should i do.
Thank you

I have got the answer.
I just duplicate a module and it just work. Thanks to all.

Related

Prestashop price edit on checkout

I'm not a Prestashop expert but a customer asked me if there is a way to change the price of individual products during checkout (he has a private ecommerce reserved only for his resellers so all the thing would be under control). I wanted to ask someone more experienced then me if this is at least feasible, if Prestashop (1.7) allows such a change; I tried to search for good among the modules on the store but I did not find any. Thank you.
There are specific prices on prestashop which allow you to define personalized prices for the product according to certain parameters.
Nothing to do with the webservice, but the doc is not very complete and they are not explained on the webservice doc, but you can find them from your back office.
https://devdocs.prestashop.com/1.7/webservice/resources/specific_prices/

Prestashop one step checkout programatically change carrier

I'm dealing with an issue, I've been working in a module that does pretty much the same as a cart rule if you have certan type of products and a certain amount in your cart, the module sets a free shipping carrier for you, this can be achieved with discount codes I know that, but the requierement was specific, Do that ... without using discount codes, So, the site has enabled the one step checkout, the module does it well in the 5 step checkout, but the hook DisplayBeforePayment does not work, I know that maybe it isn't working because of ajax call, To keep it simple, What can I do to get my module working with the One step checkout? (order-opc Controller). Thanks in advance!
I think you need to use a different hook. Please have a look at this page.
If you search for "DisplayBeforePayment", you see it's only used in /controllers/front/OrderController.php. The 5 step checkout uses this controller.
The one step checkout uses a different controller: /controllers/front/OrderOpcController.php.
The hook DisplayBeforePayment is not present in that controller, so that's why i think your module doesn't work on the one page checkout.

How to change order of payment method depend of user language in Prestashop 1.6

Firstly, sorry for my language. I want to modify my Prestashop 1.6. From back office I can change order of order of payment method (ex. check or bank wire). But I need something more. What I want to do is to change order of payment method depend on user language. For example. If user use English language then I want to display Paypal as first method. But in another the Paypal will be the second method.
I don't want code from You. Just tell me how can I do this ?
Kind regards
That is not possible easily.
You can use a module that will do it for you but I don't know if such a module exists or activate multishop and use one shop by language and set the order by shop.

Shopify API: Create a Promotion?

Using the Shopify API, is there a way to creation promotions for your store? If not, is there a way to programmatically create promotions in Shopify? (short of using CURL posts to the admin)
That is, I can create a promotion by hand using the admin and navigating to the Promotions and clicking the Add a discount code link. I'd like to be able to do the same thing programmatically, or to know for certain this isn't possible. I don't see any obvious method on the api list, but it seems like something should be an API method.
Unfortunately they don't allow it... I resorted to creating an interface to do so, though:
https://github.com/MartinAmps/Shopify-Private-APIs
Hope it helps
Edit
I also created a blog post about it.
There is no way to create discounts via the API.
If you want we have made an application that can be used to create discount codes.
Otherwise you can use a tool like Mechanize to automate coupon creation for you, but keep in mind theres a good chance that any time in the future it will break since we don't make any promises to keep our admin the same in the future. Any changes have a good chance of breaking whatever script you'd end up writing.
The Price Rules API is now public and allow any app to create price rules and discount codes.
https://help.shopify.com/api/price-rules
If you're familiar with Rails or you're already using ActiveResource for your Shopify API calls, then you can drop in this modified version of Discount < ActiveResource::Base https://gist.github.com/choonkeat/09a56da222f506e627c5

Applying a discount code to a specific product in Shopify

I've been working on setting up a Shopify store. One major feature they don't have built in is being able to provide a discount to a specific product, even though it looks like people have been requesting it since 2008!
Does anyone have any idea how this could be accomplished with their API?
Thanks!
Shopify allows you to offer product-specific discounts. On your Shopify Admin / Dashboard go to Discounts. Click on Add a discount:
On the Discount type section make sure to choose the Specific product from the dropdown:
Click on Save and you're all set. On your discounts list you'll see the generated discount with the conditions along with the product name:
Unfortunately, the Shopify API doesn’t offer product-specific discounts yet. It’s definitely in the pipe, but the feature is not available yet.