*

Dawid

  • ****
  • 149 posts
Pack PRICE ???
« on: January 08, 2018, 12:01:08 PM »
Hi i whants create PACK ( 7 days PREMIUM-Price=10euro + 7days Highlight-Price=5euro + 7 days Refresh-price=3euro) its total 18euro .

And now i have question :)
i need add code to button " Add to cart " somethink like this ..... "https://...../osclasspay/updatecart/1101x1x63x24.99"

Where i can find or create .... this last numer's :) ? /updatecart/1101x1x63x24.99"

Someone can help ? Thank's  ;)

*

MB Themes

Re: Pack PRICE ???
« Reply #1 on: January 08, 2018, 12:06:26 PM »
@Dawid
Product IDs are delimited using sign | (I think, if not then it's sign ,) ...
1101x1x63x24.99

1101 - id of service, can be found in index.php at start
1 - quantity, usually it's just 1
63 - id of item that should be promoted
24.99 - price for service

There is function that generates it, osp_add_to_cart?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Pack PRICE ???
« Reply #2 on: January 08, 2018, 12:13:23 PM »
MB-Themes Thanks for fast answer :)

ok if You can please write little more information :)


me products looks that

// PAYMENT TYPE
define('OSP_TYPE_PUBLISH', '101');
define('OSP_TYPE_PREMIUM', '201');
define('OSP_TYPE_HIGHLIGHT', '401');
define('OSP_TYPE_IMAGE', '501');
define('OSP_TYPE_TOP', '801');
define('OSP_TYPE_REPUBLISH', '601');
define('OSP_TYPE_PACK', '301');
define('OSP_TYPE_MEMBERSHIP', '701');
define('OSP_TYPE_BANNER', '1001');
define('OSP_TYPE_PRODUCT', '1101');
define('OSP_TYPE_MULTIPLE', '901');

understand i must add new Payment type somthinke like this define('OSP_TYPE_PREMIUMPACK', '1901'); ?
« Last Edit: January 08, 2018, 12:31:20 PM by Dawid »

*

MB Themes

Re: Pack PRICE ???
« Reply #3 on: January 08, 2018, 12:40:15 PM »
@Dawid
This will not work, it's static define there but it does not mean if you add new one it will work.
If you expect to create something like pack of products for better price, such functionality does not exists in plugin.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Pack PRICE ???
« Reply #4 on: January 08, 2018, 12:45:09 PM »
ok thanks :)
but in OSCLASSPOINT its exists somethink like in image :o


*

MB Themes

Re: Pack PRICE ???
« Reply #5 on: January 08, 2018, 12:49:32 PM »
@Dawid
That's not part of osclass pay plugin and is just on-site integration.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Pack PRICE ???
« Reply #6 on: January 08, 2018, 12:53:14 PM »
Nice work  ;D

i have also done :) only 1 more step need :) ( how add this 3 products "PREMIUM+HIGHLIGHT+REFRESH to cart) ... hm ??? :o

MB-THEMES mayby small sugestion ?  ;D
« Last Edit: January 08, 2018, 12:54:58 PM by Dawid »

*

MB Themes

Re: Pack PRICE ???
« Reply #7 on: January 08, 2018, 01:23:34 PM »
@Dawid
If you define product like
Code: [Select]
1101x1x63x24.99|1101x1x63x24.99|1101x1x63x24.99|1101x1x63x24.99
there are 4 products delimited using |.

In cart.php modify:
Code: [Select]
  if($product <> '') {
    osp_cart_update($user_id, $product);
    osc_add_flash_ok_message(__('Cart updated', 'osclass_pay'));
    osp_redirect(osc_route_url('osp-cart'));
  }

into:
Code: [Select]
if($product <> '') {
    $p_list = explode('|', $product);
    foreach($p_list as $p) {
      osp_cart_update($user_id, $p);
    }

    osc_add_flash_ok_message(__('Cart updated', 'osclass_pay'));
    osp_redirect(osc_route_url('osp-cart'));
  }
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Pack PRICE ???
« Reply #8 on: January 08, 2018, 10:46:11 PM »
every work corect when im add manual code : .../osclasspay/updatecart/201x1x6x168|401x1x6x168"

201 - define('OSP_TYPE_PREMIUM', '201'); /  401 - define('OSP_TYPE_HIGHLIGHT', '401');
1 - quantity,
6 - Id of item
168 - its time

but i need add new price , if i use 201 or 401 automatic its added regular Price . How i can change this ? or also i need add discount - 20% .
« Last Edit: January 08, 2018, 10:48:51 PM by Dawid »

*

MB Themes

Re: Pack PRICE ???
« Reply #9 on: January 08, 2018, 10:59:04 PM »
@Dawid
Impossible.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Dawid

  • ****
  • 149 posts
Re: Pack PRICE ???
« Reply #10 on: January 08, 2018, 11:08:07 PM »
Whats is impossible ? :)


this also  is just on-site integration.?
« Last Edit: January 08, 2018, 11:32:51 PM by Dawid »