printmarket
Forum Replies Created
-
Thanks for the reply. I am using WP E-commerce plugin.
Hi Tobias
It me again :-). Everything is looking ok now except when I use shortcodes in tables they wont executed after the table is loaded. here is the example:
http://print-market.co.uk/?page_id=30
try and change the options, it will change the table but wont execute the shortcodes. is there any solution to this!?
Hi,
Thanks for your help, everything is working now.
Really appreciate your help. Btw, I think it is going to be a good idea if you include this feature as a extension for your plugin as alot of people are looking for this ;). Love your plugin.
I have changed my template shortcode and now console.debug(data) returns the shortcode without processing the shortcode.
yes I think I found the problem. In my template I have a shortcode [table]. I am going to change it and see if it works π
Hi TobiasBg,
I am not sure exactly what you mean! when I put console.debug(data); it returns <div class=”short-table “></div>. not sure how to solve the rest of the problems. any help would be appreciated.
Ok I have made some progress but really need help from this point as I have no idea what to do.
I have made a plug-in to do a ajax call for the shortcode below is the codes that I am using now:
Inserted into my Header.php
<script> jQuery(document).ready( function ($) { $('input:radio').click(function(){ var productvar = 1; var sidevar = $("#1 input[@name=side]:checked").val(); var thicknessvar = $("#2 input[@name=thickness]:checked").val(); var finishvar = $("#3 input[@name=finishing]:checked").val(); var id = String(productvar) + String(sidevar) + String(thicknessvar) + String(finishvar); console.log('id'); var wp_nonce = '<?php echo wp_create_nonce('yoursecretnoncephrase'); ?>'; $.post('<?php echo admin_url( 'admin-ajax.php' )?>', { 'action' : 'gimmeTables', 'wp_nonce' : wp_nonce, 'id': id }, function(data){ $('#5').append(data); }); }); } ); </script>and this is my plugin code:
Plugin Code<?php /* Plugin Name: Table Generator Plugin URI: http://print-market.co.uk Description: - Version: 1.0 Author: Mehrdad Author URI: http://print-market.co.uk */ function gimmeTables(){ check_ajax_referer('yoursecretnoncephrase', 'wp_nonce'); /* basic example: ID only */ $id = absint( $_POST['id'] );; echo do_shortcode('[table id=' . $id . ' /]'); exit(); } add_action('wp_ajax_gimmeTables', 'gimmeTables'); /* for logged users */ add_action('wp_ajax_nopriv_gimmeTables', 'gimmeTables'); /* for guest users */Now the table doesnt show up which I have no idea what is the reason.
I would really appreciate it if you help me with this issue.
Hi guys
I have completed the code and all running ok! see the link below:
http://print-market.co.uk/templatesFull guide will be posted after the holiday I need to get some break after 1 week of working with this π
Hi Tobias
Thanks for the hint for DataTables. Now I have my desire datatable with the options on it. all I have to do now is to implement it in my wordpress page. As you mentioned, using HiFi plugin I am inserting the javascripts codes into the header of the page and voila you have a table with a filter :-). I will try to post a full guidance on this as soon as I get my website up and running.
Regards,
MehrdadThanks Tobias
Then I have to implement the APIs in your plugin and do the final touches!! Am I right!?
Regards,
MehrdadHi Tobias
Thanks for your reply. Would you guide me abit more on the option 1 and what exactly I have look for!. I am a C++ developer myself but havnt worked with java and PHP before but I know I can manage it and develope with a bit of hardworking. I would appreciate if you give me some hints to what exactly I have to look for and I can follow the rest myself.
Regarding the DataTables, I had that in mind before but didnt know how and in what extend I can use it.
Regards,
Mehrdad Pasha