MrAddy
Forum Replies Created
-
Forum: Plugins
In reply to: [Photography Management - WordPress Photo Proofing Plugin] Download FeatureLooking at the code it looks like huge amounts are commented out, and the function that seems to zip the files up [zip_gallery()] is not even called?
Considering the plugin was only updated a week ago, but no support tickets are responded too gives very little confidence!
Forum: Plugins
In reply to: [Photography Management - WordPress Photo Proofing Plugin] Download FeatureForum: Plugins
In reply to: [WooCommerce] Request-a-quote email admin on all status changesStill waiting for some response from the authors….
Thanks Angelo,
So if I paid for the premium, what I have outlined above will be included. Admin can add users, as bookings, and that user is then sent an email for the event ?
Thanks
Addy
Forum: Plugins
In reply to: [YITH Request a Quote for WooCommerce] Change TextI really do need some assistance with this.
I am adding add-to-quote.php to the themes folder (woocommerce), as suggested in your website (https://yithemes.com/docs-plugins/yith-woocommerce-request-a-quote/07-codex.html) site docs, and the changes are not being seen.
I need to change the text on line 553 of class.tith-request-quote.php
if ( $return == 'true' ) { $message = apply_filters( 'yith_ywraq_product_added_to_list_message', __( 'Product added!', 'yith-woocommerce-request-a-quote' ) ); } elseif ( $return == 'exists' ) { $message = apply_filters( 'yith_ywraq_product_already_in_list_message', __( 'Product already in the list.', 'yith-woocommerce-request-a-quote' ) ); }I tried adding the function, and filter to the theme function.php, but again with no prevail:
apply_filters( ‘yith_ywraq_product_added_to_list_message’, __( ‘Enquiry has been added’, ‘yith-woocommerce-request-a-quote’ ) );
I tried to add a new filter, to catch this applied filter, and still no change.
How do I customise the plugin, without the changes being effected on any update ?
Forum: Plugins
In reply to: [WP Custom Register Login] Redirect after registerI wanted to do the same. Odd it’s not an option ?
Forum: Plugins
In reply to: [Participants Database] Duplicate Check not moving fowardIf you look at the
add_optionI have managed to add to the options database, so i know its working and i cannot see any issue with it 🙂Forum: Plugins
In reply to: [Participants Database] Duplicate Check not moving fowardIt is happening, here is the function in full
function updateUserWPID($post) { global $current_user; $post['user_id'] = $current_user->user_email; $post['u_id'] = $current_user->id; //add_option('testval', $post); return $post; } add_action('db-before_submit_signup', 'updateUserWPID', 10);All I am doing is adding the user id, and email, and I thought when the $post is returned with the details already existing, it would just overwrite them. But instead it does nothing ?
Forum: Plugins
In reply to: [Participants Database] Duplicate Check not moving fowardI should add, if i remove the duplicate record to a different field, it works as expected, but adds a new record.
Forum: Plugins
In reply to: [Plugin: Participation Database] pdb_single custom template group issueI have managed to do this part of the function by using the following code:
<div class="wrap <?php echo $this->wrap_class ?>"> <?php while ($this->have_groups()) : $this->the_group(); ?> <h2><?php //echo $this->group->name ?></h2> <table class="section" id="<?php echo Participants_Db::$css_prefix . $this->group->name ?>"> <?php while ($this->have_fields()) : $this->the_field() ?> <?php if($this->group->name == "main") { ?> <tr class="<?php echo Participants_Db::$css_prefix . $this->field->name . ' ' . $empty_class ?>"> <td width="40%" class="<?php echo $this->field->name . ' ' . $empty_class ?>"><?php $this->field->print_label() ?></td> <td width="40%" name="<?php echo $this->field->name ?>" class="<?php echo $this->field->name . '_input' ?>"><?php $this->field->print_value() ?></td> <td width="20%"> <div class="<?php echo $this->field->name ?>_edit"> <a id="edit" href="" name="<?php echo $this->field->name ?>">Edit</a> </div> <div class="edit <?php echo $this->field->name ?>_save"> <a type="submit" id="save" href="" name="<?php echo $this->field->name ?>">Save</a> </div> </td> </tr> <?php } ?> <?php endwhile; // end of the fields loop ?> </table> <?php endwhile; // end of the groups loop ?> </div>If you also notice, I have added the ability to update a field without having to refresh the page using jQuery. Here is the function for this:
jQuery(document).on('click', '#edit', function (e) { e.preventDefault(); var box = "." + jQuery(this).attr('name') + "_input"; console.log(box); jQuery(box).attr('contenteditable', true); jQuery("div." + jQuery(this).attr('name') + "_save").removeClass("edit"); jQuery("div." + jQuery(this).attr('name') + "_edit").addClass("edit"); jQuery(box).focus(); }); jQuery(document).on('click', '#save', function (e) { e.preventDefault(); var box = "." + jQuery(this).attr('name') + "_input"; var newVal = jQuery(box).text(); var column = jQuery(box).attr('name'); jQuery(box).attr('contenteditable', false); jQuery("div." + jQuery(this).attr('name') + "_edit").removeClass("edit"); jQuery("div." + jQuery(this).attr('name') + "_save").addClass("edit"); //console.log('VALUE: ' + newVal + ' - And Column to update: ' + column); jQuery.ajax({ url: '/wp-content/themes/dt-the7/functions/sql_functions.php', type : 'POST', data : 'action=pdb_update&pdb=<?php echo $record->id ?>&col=' + jQuery(this).attr('name') + '&val=' + newVal, success: function(res) { // console.log(res); } }) });This Ajax call is made to another file which handles the saving of the field. This is what is looks like:
include ('../../../../wp-load.php'); global $wpdb; $action = $_POST['action']; switch ($action) { case "pdb_update": $wpdb->update("xwdi_participants_database", array($_POST['col'] => $_POST['val']), array("id" => $_POST['pdb'])); echo $res; break; }Hope it helps others 🙂
Perfect, that did the trick.
Thank you 🙂
Sorry you are not understanding. I am jumping from PDB to a Subscription Service, and for Service to work it needs the level in the URL. Once the subscription payment has been made, it then jumps to the Thank You page in PDB to finish off the process. All this works fine, but only by changing the core.
Because I am unable to change the URL. The URL is correct when its on the Sign Up page, but then loses the parameters on each click through the pages. Which is why i had to hack it. But surly its not meant to remove existing parameters, but append to them ?
Is this possible ? When the button is clicked it goes to WP to redirect, so i would need to catch it in mid flow. Looking at Participants-database.php where you ‘process the form’, line 2273. action is action=update so not sure how i would add anything else to that and have it make sense for the server?
Currently the only thing I have done is
$redirect = $post_input['action'] == 'insert' ? $post_data['thanks_page'] : self::add_uri_conjunction($post_data['thanks_page']) . 'action=update' . $_SESSION['tempServiceLevel'];So I saved the new part in Session during the custom signup. But i agree using it this way is not ideal. So I could either add to the WP pluggable.php and the core wp_redirect function or leave it as it is. So not sure whats best ?
I have found the function in question, which is in the Shortcode.class.php. I changed the action so it changes the action to add a parameter.
In Chrome debug, i can see the element <form> and also see the action which correctly adds the parameter. So, for example it looks like:
action="/?page_id=434&action=update&level=3"But, when i click the button which should, I thought, submit to this action, it moves to a new page slug, which is not part of PD, but a payment page, and its this payment page that requires the level. But i added the code on record-default.php template, so the 3 pages before the payment screen, it should have also added the level.
How do I make it so when you click proceed on a multiform, keeping the new parameter in place throughout ?
Thanks