I have a woocommerce store and I want to change the order that star ratings are displayed in the single product page. Now the star rating system is from 1 to 5. I want to display first the 5 and go to 4 - 3 - 2 - 1. Any thoughts?
Thanks
Based on your pastebin , i have edited it so that the ordering becomes 5-4-3-2-1 , check it out if it works properly
`https://pastebin.com/A2gXJnDu`
Related
i'm using Stripe Add-On over Gravity Forms to perform payments. A user can even use to pay one shot the whole amount or make it split down to 4 payments.
Let's say the form total amount is 1 000 $. We give the opportunity to the user to go on 4 payments of 250 $ instead. The whole thing is in place, we used Gravity Forms little code to stop Stripe subscription after 4 payment process. (https://docs.gravityforms.com/cancel-stripe-subscription-payments/).
I was able to put down a number type field to calculate the total amount (1000) divided by 4 (250)... but the Stripe feed only accept product field or Total Field as payment amount. And if I use product field to do the calculation, it simply add the calculated amount (250 $) to the form total (1000 $), so whe're now up to 1250 $.
Any Idea to tweak a little something by code or workaround using fields only ?
This is the last step to the whole project, ... ouff !Thank you.
Just got it.
Two ways :
1- By code using gform_submission_data_pre_process_payment.
- You could change the payment amount. https://docs.gravityforms.com/gform_submission_data_pre_process_payment/.
- Than work with number field (calculation) to show the amount to the end user.
2- Using Product field as Calculation (with CSS Trick).
- Do your math thing like : {Total} / 4
- Do NOT disable Qty option (otherwise it gonna add the amount to your total since he thinks Qty = 1).
- On the front end, you need to hide the qty since you don't want the end-user to change it (now the system thinks the qty = 0 and that's the trick) :
css trick (all forms within your site will be affected.You could go deeper within CSS to specify field with ID or even form_id=>field_id)
.ginput_quantity, .ginput_quantity_label {
display:none;
}
Stripe Feed - Subscription typeFront-end user form
I have a technical problem with the WooCommerce plugin that I can't seem to find an answer for.
I got a variable product that has two different times for workshops.
So an example to simplify:
Product: Event day ticket
Workshop 1: Red | Blue | Green
Workshop 2: Red | Blue | green
On workshop 1, every attribute needs to have 5 stock but on workshop 2 every attribute needs to have 10 stock.
I can make combination variables but if I do that, every combination has it's own stock. Not the attribute itself.
Any idea on how to work with issue?
I hope I explained it well enough.
I ran into something similar and the answer is a Variable Product with addons (one option is WooCommerce's own plugin # https://woocommerce.com/products/product-add-ons/). You'd create Workshop as a variable attribute, then create product variations and set each Workshop's total number of tickets in the variations. Then create product addons for Red, Blue, and Green (you can set the cost of addons to any value including 0). That should give you the result you're seeking.
Attributes define available "options" (like colors as you have it) but you need to set the product to be a variable product (the default is simple product) using the dropdown at the top of that configuration section. Then, on the attributes section, check the box to use the attributes as variations. Finally, on the variations tab, create the variations from attributes.
Now, you can set stock levels, prices, and more for each variation of the product where a variation is a single or combination of attributes.
Note: You may need to go into the Woocommerce settings and check the box to manage inventory at the variation level. This is from memory so I don't recall if it's in the Woocommerce settings or an option when you switch the product to variable.
I have changed dropdown to radio button using wc-variations-radio-buttons-master
The different color is also actually radio button.
The current link product have 12 such variation which have product and not other. Some combination I can explain such as Silver,Matching upholstery,VC,RegularSeat and Silver,Matching upholstery,ACC,RegularSeat have product while Silver,Matching upholstery,Regular,RegularSeat have not product now i want to hide Regular option from current scenario and all other such option which have not product.
I meant to show those radio button which have product if not then hide irrelevant radio button
Product link
If I understand your question correctly, you want woocommerce to prevent users from selecting certain combinations of options on variable products, unless a variation with the selected options actually exists and is in stock?
This probably is due to the woocommerce_ajax_variation_threshold. If your product contains more variations than the threshold specifies, woocommerce will wait until all variation options have been selected by the user before determining if the selected combination of options is valid(in stock, exists, etc). If the user has selected a combination that is not valid or is not instock, you will get the
Sorry, no products matched your selection. Please choose a different combination
Say you had a product where you can set the following attributes:
upholstery, base, arms headrest, back
That is 5 different attributes.
If each one of those attributes has 5 options, that is 25 different possible combinations assuming the user has to select all 5 options.
If the user doesn't have to select all 5 options then there are even more possible combinations.
So even if you only actually created 2 variations for this product, its woocommerce_ajax_variation_threshold would be 25, meaning 25 possible options(variations).
I think by default the woocommerce_ajax_variation_threshold is set to 10.
So to fix(filter) this, set the woocommerce_ajax_variation_threshold to a higher value. If your product has 30 possible combinations(whether they actually exist or not) set the threshold to something higher than 30, like 1111 for example.
You can use the snippet below in your functions.php file.
/* Increase Woocommerce Variation Threshold */
function wc_ajax_variation_threshold_modify( $threshold, $product ){
$threshold = '1111';
return $threshold;
}
add_filter( 'woocommerce_ajax_variation_threshold','wc_ajax_variation_threshold_modify', 10, 2 );
Please check variation matrix table, for correctly matched select of all variants with each other....
Eg.
2x2 means
11 12
21 22
3x3
111 122 113
221 222 223
331 332 333
One of the quirks in WooCommerce that causes this sort of situation is not having prices on all of your variations, the system does not always tell you that it is required so unexpected things can happen. Please check your variation data and make sure all variations have a price.
I am trying to find a plugin that will allow me to input information by category and then display on a page a table by category. For example:
I would have the following data:
String Category
Text 1 Category 1
Text 2 Category 1
Text 3 Category 2
Text 4 Category 3
Text 5 Category 3
But then I want to display this information in a table by category on a webpage. One page may include a table that only displays Category 1. Another page may have a table that displays information from Categories 1, and 2. And so on.
There are many table plugins out there, I am just having a hard time finding something that would allow me to do this.
I guess what I am trying to avoid, is having to create multiple tables for the same type of data (but may be slightly different for each one). I would like to have one central list and then assign it categories and have it display tables based on the categories I want it to display. And by the way it does not have to be a free plugin.
I currently have 5 custom post types on my website for 5 different kind of products.. I would like to give each product an unique ID, seperate from the wordpress-generated ID value.
Illustrated with an example. Lets say I have:
1. Apples
2. Pears
3. Bananas
4. Oranges
5. Melons
If I add my first apple it's ID would be 001. If I then add an orange it's id would be 002, and so on.. If I add a page or a default post, this should have no effect on the product ID.
Is there any way this could be done with some clean and lightweight code? Any help is highly appriciated!
I'm pretty sure you should always start your id's with a LETTER.
So having a1, a2, a45, etc would work..
Could you please be more specific though. Like how may products will this website have? Under 50? Over 500?
Are the products going to appear on multiple pages?? Are you using a plugin for the products or custom coding?
Depends upon the usage - yes but solution exists. You can do this using custom fields since wordpress gives the option of custom fields you can use that and write your own function based upon that.
Hope this helps !!