Title: [Plugin: eShop] Will all do respect
Last modified: August 19, 2016

---

# [Plugin: eShop] Will all do respect

 *  [vadimg88](https://wordpress.org/support/users/vadimg88/)
 * (@vadimg88)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-eshop-will-all-do-respect/)
 * I have installed this plugin for a client as he requested, He also requested 
   to add a simple gateway. A gateway that only queries another site and returns
   an error code or success code based on the transaction. When i started browsing
   how the gateways and the plugin is built i got a serious headache! I’ve never
   seen a code messier then these written in this plugin, I have no idea why people
   are writing in this type of manner, It’s messy, it’s not readable, It’s written
   in the worst way possible and worst thing is that it’s not even documented. How
   can one do something about it when he tries to do the least as implement a simple
   gateway and fails.
 * It’s just a shame, All i wanted is to develop something for this plugin but for
   a few hours i just tried to figure out why the things that i am trying to do 
   which are very simple just fails when used inside this plugin.
 * just wanted to share my experience as a developer using and developing for this
   plugin. I still can’t figure out how to add more then just one screen after the
   checkout process (Wanted to redirect him to another form where he submits his
   credit card information and then once that form is submitted to redirect him 
   to a page it processes the info provided and returns true/false whether the transaction
   was completed or not).
 * Thank You.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Anonymous User
 * (@anonymized-3085)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-eshop-will-all-do-respect/#post-1686536)
 * It was never designed to be extensible, so I’m retrofitting as I go along. However
   that part is likely to remain as is for a while until I can trim down some of
   the duplication that has crept in over time.
 * Yes the code does need a little tidying up, again it is, albeit slowly.
 * The original scripts I based it on didn’t have much in the way of inline documentation
   either by the way.
 * The majority of the gateway code is contained within a couple of files, and eventually
   I’ll be adding in necessary actions/filters so that new merchant gateways can
   be added via a secondary plugin making it a lot easier all round.
 * Oh and thanks for letting me know, shame you couldn’t have emailed me sooner 
   though.
 *  Thread Starter [vadimg88](https://wordpress.org/support/users/vadimg88/)
 * (@vadimg88)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-eshop-will-all-do-respect/#post-1686846)
 * Thank you for the reply. Could you at least direct me to the right place on how
   to enable another screen after submitting the cart information and completing
   the checkout process? Or showing some example code that does that?
 * Thanks again.
 *  Anonymous User
 * (@anonymized-3085)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-eshop-will-all-do-respect/#post-1686847)
 * After the checkout information has been confirmed the last page in the process
   is the redirect page, in the majority of merchant gateways it is found within
   the switch statement:
 *     ```
       switch ($eshopaction) {
           case 'redirect':
       ```
   
 * The value is set here:
 *     ```
       if($eshopoptions['checkout']!=''){
       $p->autoredirect=add_query_arg('eshopaction','redirect',get_permalink($eshopoptions['checkout']));
       ...
       ```
   
 * So if you wanted to add something in between confirmation and the redirect you’d
   need to add something like:
 *     ```
       $p->interim=add_query_arg('eshopaction','interim',get_permalink($eshopoptions['checkout']));
       ```
   
 * and then code as required. (adding a section to the switch statement).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: eShop] Will all do respect’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eshop_d6e4b8.svg)
 * [eShop](https://wordpress.org/plugins/eshop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eshop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eshop/)
 * [Active Topics](https://wordpress.org/support/plugin/eshop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eshop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eshop/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: Anonymous User
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-eshop-will-all-do-respect/#post-1686847)
 * Status: not a support question