Buy from site not working

Tagged: 

This topic contains 9 replies, has 2 voices, and was last updated by  sandibitenc-net 1 year, 6 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #9928

    sandibitenc-net
    Participant

    I’m following up on this theme: https://wplms.io/forums/topic/buy-from-site-button-not-working/

    My app and plugins are the latest, in app purchase is set to true, wallet is set to false, changes api version but the buy from site still doesn’t work. It doesn’t do anything either on my android phone or web browser.

    #9929

    sandibitenc-net
    Participant
    This reply has been marked as private.
    #9935

    Alex
    Keymaster

    Ok I checked your site .I found that you are not using traditional variable product for your course.
    You are actually using woocommerce subscriptions for your course for which api support has not been added yet  .
    That is why the api is not able to fetch any information about pricing coz subscriptions are slightly different structure .
    We will be integrating the woocommerce subscriptions in app soon .
    We could integrate the buying process easily but implementing subscriptons will take some time.

    #9961

    sandibitenc-net
    Participant

    Can you give me some advice please. I can’t start using the app at all if I don’t get the payment sorted out so what am I to do?

    1. Wait for the woo subscriptions support? How long aproximately will that take? In this case is it possible to hard code the website link of the Cart in the app “buy from site” button?

    2. Change to the WPLMS supported payment site? Is it possible to have a membership site with recurring subscriptions with this option? How is the app wallet support for this?

    #9975

    Alex
    Keymaster

    1. yes we can do that but subscription support is not available in app .User will continue to access the course even when it is expired . If you are ok with that then we can implement the product url to the app api call .

    2. Well wallet does not supports subscriptions as of now in app . Also we have not tested the recurring subscriptions with woocommerce memberships. We either recommend using the woocommerce memberships completely or woocommerce subscriptions  .

    #9990

    sandibitenc-net
    Participant

    Well I am using the woocommerce memberships with wplms woocommerce membership addon, I’m using woocommerce subscriptions to manage payments so I guess that the website will handle payments and cancel memberships if not paid. The app will only have to check if membership is active for the user (and it does that already). So I would only need to link the user from the app when he clicks no the “buy from site” button to the website cart. wouldn’t that be possible to hardcode in the app directly?

    #9993

    Alex
    Keymaster

    As I said yes we can open the website cart to user when she clicks on buy from site .
    But suppose user purchases and added to course.After some days his membership expires . Now what will happen in app that she will able to access the course and its all content despite the membership expires as subscriptions and memberships checks are not implemented in app and api as of now .

    #9997

    sandibitenc-net
    Participant

    Now I don’t understand this. I just tested membership expiration once more in the app and it seems it’s working just fine.

    I created a user in the app and I can’t access premium content. Then I added the user to membership and I can access premium content in app. Then I manually expired the membership for the user, closed the app and opened it up once more and I couldn’t access premium content. So it seem s to me it’s working just fine.

    Can you please give me some instructions how to change the code so I can insert a custom link? I guess I have to change the file course.ts. I think it’s this code:

    text: this.config.get_translation(‘buy_from_site’),
    handler: () => {
    this.buyFromSite(pricing);
    }

    but I need help how to insert my custom link into it.

    #10019

    Alex
    Keymaster

    This change will be done in api call .
    Please try adding this url custom code in your wplms-customizer.php file in wplms customizer plugin :

    add_filter(‘bp_course_rest_prepare_course’,function($response, $course, $request){

      if(!empty($response->data[‘course’][‘price_html’]) && is_array($response->data[‘course’][‘price_html’])){

        foreach ($response->data[‘course’][‘price_html’] as $key => $value) {

          $response->data[‘course’][‘price_html’][$key][‘link’] =  ‘http://google.com’;

        }

      }else{

        $response->data[‘course’][‘price_html’][‘link’] =’http://google.com’;

      }

      return $response;

     

    },10,3);

     

     

    change the “http://google.com” to your custom link in above code .

    #10021

    sandibitenc-net
    Participant

    Thanks Alex

    It works

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Buy from site not working’ is closed to new replies.

Template Design © VibeThemes. All rights reserved.