Osclass forums
Support forums => Plugins => Plugin Payments => Topic started by: design on October 03, 2013, 10:13:00 pm
-
I would like the user to be taken to the /payment/menu but I do not know what hook to use and where to use it. I'm assuming
<button type="submit" class="ui-button ui-button-middle ui-button-main"><?php if($edit) { _e("Update", 'bender'); } else { _e("Publish", 'bender'); } ?></button>
and/or this
$action = 'item_add_post';
$edit = false;
if(Params::getParam('action') == 'item_edit'){
$action = 'item_edit_post';
$edit = true;
in the item-post.php
or in Item.php
$this->doView('item-post.php');
break;
case 'item_add_post': //post_item
osc_csrf_check();
if( osc_reg_user_post() && $this->user == null ) {
osc_add_flash_warning_message( _m('Only registered users are allowed to post listings') );
$this->redirectTo( osc_base_url(true) );
}
I think it's the item.php in red, but I haven't figured out how to speak in OSClass yet?! osc_base_url = /payments/menu.php
-
noope, not those...
trying this one in item.php
// POST ITEM ( ADD ITEM )
$success = $mItems->add();
if($success!=1 && $success!=2) {
osc_add_flash_error_message( $success);
$this->redirectTo( osc_item_post_url() );
-
another easy fix from teseo---
replaced the flash message with this. I'm using the more edit plugin
Your ad needs to be <a href="/payment/menu">paid for</a> and then approved by the administrator, it could take a while until it appears on the website
-
Hi,
i did it following this
http://dev.osclass.org/2012/08/20/redirect-to-a-landing-page-after-adding-a-new-listing/
-
In the Premium 'Landing Page' I added this bit of code so that if members chose not to use premium there was a link away from the premium page, which just helps keep things tidy and simple.
<h1>Make your Ad premium?</h1> <h2><a href="http://www.insertyourdomain.com">No Thanks</a></h2>
Work in progress at moment but this is the idea
-
thanks for the tips. though I think that having this option should be "out-of-the-box" or we should not have to create a new page. which is why I wanted to redirect them to their account page where the can do so much more i.e. edit, delete old, make other ads premium. While having the new post go straight to the live ad is not very productive, even if a free ad. Common business sense would have them go to make it premium!
-
another easy fix from teseo---
replaced the flash message with this. I'm using the more edit plugin
Your ad needs to be <a href="/payment/menu">paid for</a> and then approved by the administrator, it could take a while until it appears on the website
Where exactly did you place this? I cannot seem to find the file in which it should reside.
-
If you are comfortable changing core codes, here is something careylist was kind enough to figure out for us.
http://forums.osclass.org/general-help/bender-1-0-theme-how-to-add-publish-or-premium-ad-option/15/?topicseen