Bypass process

This topic contains 22 replies, has 2 voices, and was last updated by  CTHthemes 1 week, 3 days ago.

Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #36451

    Aron Verhoeven
    Participant

    Supported

    Hi CTHthemes,

    First of all: I really like your theme. You’re doing an great job. However, I’m currently missing two important functions for my website and business:

    1. Other payment option (I would like to make use of Mollie);
    2. Let the customer first fill in their listing, and then fix the payment.

    I can imagine that it is complicated to fix these options. That’s why I tried to search for other options to avoid those problems. I think I found one. However, I need your advice and expertise. Will try to explain is short and clear:

    I was thinking to create 3 Listing Types which are all free on the backend. However, they all have different listing fields, specifications, etc. I would like to display them on an listing page (https://www.marktadvisor.nl/markt-promoten/). So in the backend they are Free, so that users directly can submit their listing. In reality the listing types are €0,00, €23,00 and €37,00. When they complete the submit listing, they need to be reffered to an Mollie checkout page, when they hit ‘Save Changes’ (https://prnt.sc/p9hqy0). So for each Listing Type ‘Save Changes’-button an different Mollie check-out page, except the first one, because this one is free. This one need to be reffered to the thankyou page.

    In order to clarify myself, I’ve created an scheme: https://prnt.sc/p9hnha.

    So there are a few things which I need to setup. I really hope u can help me with that.

    1. Refer the buttons on https://www.marktadvisor.nl/markt-promoten/ to the submit listing pages of the “”free””Listing Types. (https://prnt.sc/p9i9rf).
    2. Refer the ‘Save Changes’ button for each Listing Type (so total of 2), to an Mollie checkout page and save the listing too. The free one direct to the Thankyou-page (marktadvisor.nl/bedankt). Important: if users edit their listings from out their backend, the button DON’T need to be transfered to the Mollie checkout pages. This is the hard part I think..

    I know I have than to check the listings and payment manually, but that’s ok.

    I really hope u can help me out! Thanks in advance.

    Kind Regards,
    Aron Verhoeven

    #36452

    Aron Verhoeven
    Participant

    Supported

    And another thing:

    3. I’s important that before users van Submit their listing, they have to login/register. Any advice for this point? How to fix this? Because the pricing tables page is not from the theme itself and created by myself. So the buttons on http://www.marktadvisor.nl/markt-promoten need also to check if the user is logged in? I think?

    Thanks in advance!!

    #36529

    Aron Verhoeven
    Participant

    Supported

    Any options on this? 🙂

    #36557

    CTHthemes
    Keymaster

    Hello, it’s not possible. Author must purchase a membership package before submit listings.

    #36628

    Aron Verhoeven
    Participant

    Supported

    Hi CTHthemes,

    I understand, is there than an way to do the following? :

    If I set the price on 0 for an Listing Type, they can directly submit their listing right? (I know I have to check it first, before publishing, but that is ok). So if I set the price in the backend to €0,00, and redirect them after they have submit their listing, to my own payment page, that would be possible right?

    When they finished the payment on my own payment check-out provider, I can redirect them back to the website.

    Only than I have to know how to redirect them to the payment page and save their credentials, filled in when submitting the listing. So when they hit ‘Save Changes’ when they submit the listing for the first time, they need to be redirected to my own payment page. Is this possible?

    Hope u can help me out.

    Kind Regards,
    Aron Verhoeven

    #36631

    CTHthemes
    Keymaster

    If I set the price on 0 for an Listing Type, they can directly submit their listing right?

    –> Yes. Author can submit listing right after select free membership plan. https://prnt.sc/pb66p2

    So if I set the price in the backend to €0,00, and redirect them after they have submit their listing, to my own payment page, that would be possible right?

    –> Try this modification: https://prnt.sc/pb68zg
    Change custom_payment_url with your payment page url

    
    if($is_editing_listing == false){ 
    
        $json['url'] = 'custom_payment_url' ;
    
    }
    
    #36645

    Aron Verhoeven
    Participant

    Supported

    Really cool, that worked! Thanks.

    Is it possible to arrange an redirect for each different Listing Type? So if user chose Listing Type A, he is redirected to URL A, if he chose Listing Type B, he is redirected to URL B.

    Something maybe with:

    if($is_editing_listing == false){
    
       if($id-listing_type = [ID LISTING TYPE]) {
            $sjon['url'] = '[....URL A....]'
       if($id-listing_type = [ID LISTING TYPE]) {
            $sjon['url'] = '[....URL B....]'
    
    }

    Something like this?

    Thanks in advance.

    Aron

    #36664

    CTHthemes
    Keymaster

    Use $listing_type_id variable to get listing type id

    #36694

    Aron Verhoeven
    Participant

    Supported

    Is this the correct way: https://prnt.sc/pcleq2?

    if($is_editing_listing == false){
            if($listing_type_id = [#2320]
    	$json['url'] = 'https://useplink.com/payment/B6YcKkPk2wlb6nWLAk59/' ;
    				
    }
    #36703

    CTHthemes
    Keymaster
    if( $is_editing_listing == false ){
       if( $listing_type_id == 2320 ){
          $json['url'] = 'https://useplink.com/payment/B6YcKkPk2wlb6nWLAk59/' ;
       }			
    }
    #36714

    Aron Verhoeven
    Participant

    Supported

    Much, thanks. It’s working 🙂

    Now I have set all Listing Types prices to €0,00, so that they are directly reffering to Submit Listing page. However, when they receive the Invoices in their mail, but also in their Dashboard, the price is (of course) actually €0,00, while they fixed the payment via an external link, with the correct price (http://prnt.sc/pcrszl).

    In that way the invoices are incorrect, if you understand what I mean (https://prnt.sc/pcrws3).

    Is there an way to ‘forge’ this? With translations?

    So I want the function that the Listings Types are free (so that they are directly reffering to Submit Listing Page), but on the front-end, for the users, they have an price.

    Thanks in advance.

    #36761

    CTHthemes
    Keymaster

    You have to edit from emails.php file: https://prnt.sc/pd8ycs
    Change oder_amount depends on $plan_id variable.

    #36791

    Aron Verhoeven
    Participant

    Supported

    Mmm.. I won’t work.

    Do you have an example code for me? Much thanks in advance.

    Kind Regards,
    Aron Verhoeven

    #36823

    CTHthemes
    Keymaster
    $amount = 0;
                            if($plan_id == 100) 
                                $amount = citybook_addons_get_price_formated( 36 );
                            elseif($plan_id == 200) 
                                $amount = citybook_addons_get_price_formated( 136 );

    https://prnt.sc/pdqvih

    You may need edit order_completed function bellow.

    #36890

    Aron Verhoeven
    Participant

    Supported

    Thanks, I have changed emails_auth_order_completed_subject, emails_admin_order_completed_subject and emails_admin_new_order_subject.

    emails_auth_order_completed_subject: https://prnt.sc/pe8npq
    emails_admin_order_completed_subject: https://prnt.sc/pe8pi5
    emails_admin_new_order_subject: https://prnt.sc/pe8mwq

    However, the price in the invoice mail doesn’t change.

    Are there some more steps I need to arrange? Do I have to change the template tags in the mail?

    Thanks in advance.

    Aron Verhoeven

    #36934

    CTHthemes
    Keymaster

    For invoice email: https://prnt.sc/pen1ai

    to get plan id of invoice:

    
    $plan_id = get_post_meta( get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'order_id', true ) , ESB_META_PREFIX.'plan_id', true);
    
    #36949

    Aron Verhoeven
    Participant

    Supported

    Hi Support,

    I’ve changed rule 194 to the given code above. Is that right? See: https://prnt.sc/pengi3.

    Or do I also have to change rule 187, to $amount, and add

    $amount = 0;
                            if($plan_id == 100) 
                                $amount = citybook_addons_get_price_formated( 36 );
                            elseif($plan_id == 200) 
                                $amount = citybook_addons_get_price_formated( 136 );

    ?

    Thanks in advance. I’m almost there 😉

    #36955

    CTHthemes
    Keymaster

    https://prnt.sc/peniwn

    
    $plan_id = get_post_meta( get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'order_id', true ) , ESB_META_PREFIX.'plan_id', true);
            $amount = 0;
            if($plan_id == 100) 
                $amount = citybook_addons_get_price_formated( 36 );
            elseif($plan_id == 200) 
                $amount = citybook_addons_get_price_formated( 136 );
            return array(
                'author' => get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'user_name', true ),
                'amount' => $amount,
                
                'method' => citybook_addons_get_order_method_text(get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'payment', true )),
                'title' => $invoice_post->post_title,
                'number' => $invoice_post->ID,
                'date' => citybook_addons_date_format( $invoice_post->post_date ),
    
                'plan' => get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'plan_title', true ),
                'expire' => citybook_addons_date_format( get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'end_date', true ), true ),
                
            );
    #37066

    Aron Verhoeven
    Participant

    Supported

    Hi Support,

    Much thanks! That worked!

    I have one last thing which I would like to add. That is the tax: https://prnt.sc/pfy4lv.

    https://prnt.sc/pfy2v6

    I was thinking about adding an $tax array, to add this to the total price:

    		$tax = 0;
            if($plan_id == 2320) 
                $tax = citybook_addons_get_price_formated( 7.77 );
            elseif($plan_id == 2319) 
                $tax = citybook_addons_get_price_formated( 2.23 );

    and then the return array:

    'amount' => $amount, $tax,

    At the end it should count the total of the $amount and $tax array, right here: https://prnt.sc/pfy82k.

    Do you think, this will work out with the code above?

    #37104

    CTHthemes
    Keymaster

    You have to add new value

    
    'tax' => $tax,
    
    #37119

    Aron Verhoeven
    Participant

    Supported

    Okey, I tried, but it doesn’t seem to have any effect. I would like to arrange the following (made an draw in Paint3D): https://prnt.sc/pgem5y -> see understanding numbers corresponding to the image.

    1. Just the price of the Listing Plan, based on the listing type ID. Thats fine now with https://prnt.sc/pgeo8l.

    2. Instead of subtotal, I would like to change it to tax (21%); The text I can translate, but for the tax amount I need to change the formula. I tried as follow: https://prnt.sc/pgepj5. But I think I have to make an connection on rule 145 and 146: https://prnt.sc/pgeqcs. How can I arrange this?

    3. Must be the total of 1 and 2 (so Listing Plan & Tax);

    4. Need to delete it. I think I can delete just: https://prnt.sc/pgemug?

    #37205

    Aron Verhoeven
    Participant

    Supported

    For everyone who would like to know, I’ve made some changes in my invoice files. Now my invoice looks as follows: https://prnt.sc/ph1phc

    1. https://prnt.sc/pgeo8l.

    2. I’ve created an new static function in cpt.invoice.php, with specific tax-prices for the different plans: https://prnt.sc/ph10le.

    $plan_id = get_post_meta( get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'order_id', true ) , ESB_META_PREFIX.'plan_id', true);
    		$tax = 0.00;
            if($plan_id == 2320) 
                $tax = citybook_addons_get_price_formated( 7.77 );
            elseif($plan_id == 2319) 
                $tax = citybook_addons_get_price_formated( 4.41 );

    and return array:

    'tax' => $tax,

    To show it on your invoice, I’ve added {{{data.tax}}} to the tmpls-view-invoice-modal.php file: https://prnt.sc/ph13e1.

    3. I’ve done the same thing as in step 2. For each of the listing plans, I’ve calculated the total price, included the tax. So I have used an new static function ass wel:

    $plan_id = get_post_meta( get_post_meta( $invoice_post->ID, ESB_META_PREFIX.'order_id', true ) , ESB_META_PREFIX.'plan_id', true);
    		$totalamount = 0.00;
    		if($plan_id == 2320)
    			$totalamount = citybook_addons_get_price_formated ( 44.77);
    		elseif($plan_id == 2319)
    			$totalamount = citybook_addons_get_price_formated ( 25.41);

    and as return array:

    'totalamount' => $totalamount,

    To show it on your invoice, I’ve added {{{data.totalamount}}} to the tmpls-view-invoice-modal.php file: https://prnt.sc/ph1o2e.

    4. Deleted the code in the tmpls-view-invoice-modal.php.

    #37241

    CTHthemes
    Keymaster

    Thank you for sharing the solution.

    • This reply was modified 1 week, 3 days ago by  CTHthemes.
Viewing 23 posts - 1 through 23 (of 23 total)

You must be logged in to reply to this topic.

New featues: CityBook - Listing & Directory WordPress Theme version 2.1.8 was outUpdate now
+