felixtheratruns
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Woocommerce composite products scenarios not workingThanks for the info guys. I’m curious now, can anyone point me to the license for the original composite products plugin? I have not been able to find it. I know some people sell gpl software even though you can download the source code, and since the license that came with the composite products plugin I downloaded says GPLv3 I always assumed it was legal (wouldn’t have used gpldl otherwise)
the only thing I found was this from here: https://yithemes.com/themes/plugins/yith-woocommerce-composite-products/
“A license entitles you to 1 year of updates and support. Each installation of the plugin will require a license key in order for you to receive updates and support.”
It says nothing about the software itself being charged for, just support from the original developers and automatic updates.UPDATE: it says the same thing here: https://woocommerce.com/products/composite-products/ so on the surface it looks like gpldl.com is legal to me, let me know if you have evidence to the contrary.
- This reply was modified 7 years, 4 months ago by felixtheratruns.
- This reply was modified 7 years, 4 months ago by felixtheratruns.
Forum: Plugins
In reply to: [WooCommerce] Woocommerce composite products scenarios not workingI didn’t pay for it. It can be downloaded for free at gpldl.com since it is open source software and the source code must be made available. (at least that is my understanding) (also I wasn’t the one who setup the plugin originally)
However, I went to woocommerce’s site and tried to get support:https://woocommerce.com/my-account/create-a-ticket/?
“Please note that this account is a non-paying customer, so support is limited to the options found on the left.If you have purchased a product from us, please log in under the purchasing account. Otherwise please purchase an item to gain access.”
There is no option for support for composite products, just free extensions.
- This reply was modified 7 years, 4 months ago by felixtheratruns.
Forum: Fixing WordPress
In reply to: Woocommerce composite products scenarios not workingthat’s fine I know how to copy and paste ?? Thanks for letting me know.
- This reply was modified 7 years, 4 months ago by felixtheratruns.
Forum: Themes and Templates
In reply to: [Church] Header Image on Home Page OnlySo yeah I can’t find that option either so I did this:
In your wp-content/themes/church directory
In header.php add
if( is_front_page() ) { do_action( 'omega_church_banner' ); }
so it will look like this:
<?php do_action( 'omega_before_header' ); do_action( 'omega_header' ); do_action( 'omega_after_header' ); if( is_front_page() ) { do_action( 'omega_church_banner' ); } ?>
then in functions.php comment out:
add_action( 'omega_after_header', 'church_banner' );
and add
add_action( 'omega_church_banner', 'church_banner' );
so that will look like this:
#don't show church banner on header pages: #add_action( 'omega_after_header', 'church_banner' ); add_action( 'omega_church_banner', 'church_banner' );
Forum: Fixing WordPress
In reply to: Is it secure to leave a database dump in the site folder?No it’s not a .git. Good to know, thanks.
Forum: Fixing WordPress
In reply to: Is it secure to leave a database dump in the site folder?ok ok ok! I’m scared now you can all lay off ?? ?? also this is a really good thing to read: https://blog.sucuri.net/2015/06/websites-hacked-via-website-backups.html
Thanks guys, I appreciate the well deserved warning.
Forum: Fixing WordPress
In reply to: Is it secure to leave a database dump in the site folder?Well I want to store a backup of the database in the same git repo as the wordpress site. (I haven’t found a way to keep track of the database synchronized with updates to the site’s code except by doing this) So what would be the most secure way to do this? If I put the dump in a subfolder with permissions 700 I can’t get to it through the browser, same goes if I set the permissions on the file to 700. (600 works too and my understanding is that they would have to hack the server to access the file)
Forum: Plugins
In reply to: How To Integrate My Plugin with Composite Products PluginActually this is how it works right now. You can see the button that submits the form now, (it is actually the same ADD BUILD TO CART button that I used before to run the javascript in the origin post:
<a id="buycode" class="single_add_to_cart_button shop-skin-btn shop-flat-btn alt" href="#" onclick="add_all_to_cart('<?php echo $arr; ?>')">ADD BUILD TO CART</a> <form id="cart_form" type="hidden" method="post" enctype="multipart/form-data" class="composite_form"> <p><input type="hidden" name="wccp_component_selection[1456885122]" value="<?php echo $product_ids['motherboard'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885122]" value="<?php echo $product_ids['motherboard-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885123]" value="<?php echo $product_ids['processor'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885123]" value="<?php echo $product_ids['processor-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885124]" value="<?php echo $product_ids['ram'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885124]" value="<?php echo $product_ids['ram-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885267]" value="<?php echo $product_ids['cpu-cooling'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885267]" value="<?php echo $product_ids['cpu-cooling-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885268]" value="<?php echo $product_ids['power-supply'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885268]" value="<?php echo $product_ids['power-supply-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885269]" value="<?php echo $product_ids['video-graphics-card-gpu'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885269]" value="<?php echo $product_ids['video-graphics-card-gpu-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885783]" value="<?php echo $product_ids['blu-ray-dvd-player'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885783]" value="<?php echo $product_ids['blu-ray-dvd-player-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885784]" value="<?php echo $product_ids['hard-disk-drive'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885784]" value="<?php echo $product_ids['hard-disk-drive-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885785]" value="<?php echo $product_ids['solid-state-drive'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885785]" value="<?php echo $product_ids['solid-state-drive-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885786]" value="<?php echo $product_ids['operating-system'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885786]" value="<?php echo $product_ids['operating-system-q'] ?>"> <p><input type="hidden" name="wccp_component_selection[1456885787]" value="<?php echo $product_ids['case'] ?>"> <p><input type="hidden" name="wccp_component_quantity[1456885787]" value="<?php echo $product_ids['case-q'] ?>"> <p><input type="hidden" name="quantity" value="1"> <p><input type="hidden" name="add-to-cart" value="730"> <p><input type="hidden" name="wccp_active_scenarios" value="0"> <button style="position: absolute; left: -9999px"; id="submit_button" type="submit">Submit</button>
This is the script that runs and submits the form, I don’t think the cart needs to be reloaded since the form takes you to the cart page anyway, so I’m going to take that out:
<script type='text/javascript'> function malformedJSON2Object(tar) { var obj = {}; tar = tar.replace(/^\{|\}$/g,'').split(','); for(var i=0,cur,pair;cur=tar[i];i++){ pair = cur.split(':'); obj['\''+pair[0]+'\''] = /^\d*$/.test(pair[1]) ? +pair[1] : pair[1]; } return obj; } Object.size = function(obj) { var size = 0, key; for (key in obj) { if (obj.hasOwnProperty(key) && obj[key] != '') size++; } return size; }; function add_all_to_cart(str_comp){ var obj = malformedJSON2Object(str_comp); var length_obj = Object.size(obj); if(length_obj < 22 ){ var r = confirm('You have not selected all the parts, are you sure you want to add build to cart?'); if (r == true) { } else { return; } } var el = document.getElementById('cart_form'); el.submit(function( event ) { alert( 'Handler for .submit() called.' ); event.preventDefault(); }); reloadCart(); } function reloadCart() { var url = window.location.href jQuery('#wpmenucartli').load(url + ' #wpmenucartli .wpmenucart-contents'); console.log('cart reloaded'); } </script>
Forum: Plugins
In reply to: How To Integrate My Plugin with Composite Products PluginI was wonder if “Submit” button run just the javascript code which you paste in first post ?
It was this that ran it:
<a id="buycode" class="single_add_to_cart_button shop-skin-btn shop-flat-btn alt" href="#" onclick="add_all_to_cart('<?php echo $arr; ?>')">ADD BUILD TO CART</a>
<input name="wccp_component_selection[1457712016]" value="576">
From where did you take this number for wccp_component_selection array ? It’s auto generated
I got it from fiddler, it is also in the html on that composite product’s display page.
<input name="add-to-cart" value="776">
Is that just composite product id ?
Yes correct.
Forum: Plugins
In reply to: How To Integrate My Plugin with Composite Products PluginThis form works to add the product and it’s components to cart:
<form method="post" enctype="multipart/form-data" class="composite_form"> <p><input name="wccp_component_selection[1457712016]" value="576"> <p><input name="wccp_component_quantity[1457712016]" value="1"> <p><input name="wccp_component_selection[1457712072]" value="624"> <p><input name="wccp_component_quantity[1457712072]" value="1"> <p><input name="quantity" value="1"> <p><input name="add-to-cart" value="776"> <p><input name="wccp_active_scenarios" value="0"> <button type="submit">Submit</button> </form>
and it generates this request in fiddler.
POST https://localhost/grandassembly/build-page/ HTTP/1.1
Host: localhost
Connection: keep-alive
Content-Length: 848
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: https://localhost
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Content-Type: multipart/form-data; boundary=—-WebKitFormBoundaryERPPvymf9VYcPxDA
Referer: https://localhost/grandassembly/build-page/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8——WebKitFormBoundaryERPPvymf9VYcPxDA
Content-Disposition: form-data; name=”wccp_component_selection[1457712016]”576
——WebKitFormBoundaryERPPvymf9VYcPxDA
Content-Disposition: form-data; name=”wccp_component_quantity[1457712016]”1
——WebKitFormBoundaryERPPvymf9VYcPxDA
Content-Disposition: form-data; name=”wccp_component_selection[1457712072]”624
——WebKitFormBoundaryERPPvymf9VYcPxDA
Content-Disposition: form-data; name=”wccp_component_quantity[1457712072]”1
——WebKitFormBoundaryERPPvymf9VYcPxDA
Content-Disposition: form-data; name=”quantity”1
——WebKitFormBoundaryERPPvymf9VYcPxDA
Content-Disposition: form-data; name=”add-to-cart”776
——WebKitFormBoundaryERPPvymf9VYcPxDA
Content-Disposition: form-data; name=”wccp_active_scenarios”0
——WebKitFormBoundaryERPPvymf9VYcPxDA–I noticed it doesn’t even need to be pointed to the composite product url. Now I just have to get the data into the form from my code, make it work with the real composite product with all the components (not just the test composite with just the processor and motherboard) and I need to hide the form so the user can’t see the values. But otherwise I’m done, i’ll see if I have time to post the final solution I come up with.