Associative Array Use to get dynamics Cards index in Laravel Blade using php - laravel-blade

I am a beginner in Larvavel and stuck at a point, need help.
I am working on an e-commerce app, in which each product(i.e, a t-shirt)
have multiple colors and each color has multiple sizes,
Users should be able to add products in this format
color[$i]size[$j]
which means
For First Color Product:
color[0]size[0]
color[0]size[1]
For Second Product Color
color[1]size[0]
color[1]size[1]
color[1]size[2]
and similar for Multiple products as required
Add More Size button to add one more size to this color, and Add button to add new product color

Related

Conditional clothing product options based on Size and Color

I have a Woocommerce website in which we sell printed t-shirts, hoodies and sweatshirts. We have two product attributes; Size and Color. Currently, we're using the built-in attributes options like this (Our site is in Persian so I used a translator for you, it looks different because of that but we're using the defaults of Woocommerce):
https://i.stack.imgur.com/wqMgt.jpg
Now the problem is that if we want to make a specific size of a specific t-shirt unavailable, we have to either change the variations in products one by one (It's impossible because we have thousands of products with at least 70 variations) or use a plugin to bulk select and edit variations which we do. But it's still very slow and inefficient. As we add more products, it gets harder and slower to change a variation's status.
So what we need is a way to add global conditional logic that let us define which size of which color is available for t-shirts at any given time without needing to change anything inside the product editor. I've tried plugins like Yith Woocommerce Product Add-ons but they don't solve our problem. As you can see from the image, they let you set a single conditional logic for a whole field, they don't provide a solution for adding conditional logic to each option in a field.
Yith Product Add-ons limitation
Can you help me find a solution to this problem? In short, I need a plugin or solution that lets me set conditional logic for my attributes from the admin panel for t-shirt size and color without needing to set them in product pages.

Conditionally Apply Class with Advanced Custom Fields

I'm using Advanced Custom Fields (ACF PRO) to build out a CMS for a client. Currently, ACF allows you to give a particular field a class. In addition, you can make this field appear under certain conditions.
I'm looking for a way to combine the these two concepts.
Simply put, let's say I want to have a text editor's background color turn blue if a certain condition is met. With the current set up, I'd have to create two completely different fields, a default field and a field that has its own class that I can target and make blue. This would mean that, if I started typing out my content and decided halfway through that I would rather a blue background, the content would appear to disappear because a completely new field would have to load based on the new condition.
I'd much rather be able to conditionally apply a class to a single field.
Can anyone point me in the right direction?

How to change the product when user clicks color variant - Woocommerce

I am working on some fashion website with Woo-commerce and wordpress. I want to change the product Like (Same product in Red, Same product in Blue) while user clicks color variant, How can I do it. Thank you
You can do this by setting your product type to variable product and add color attribute there from Add attributes to use for variations.
After adding color variation you can add multiple products there for an individual color option with different properties. You can do it from the variation tab.
For more information, you can see this tutorial.
Follow this tutorial step by step. This is the WooCommerece default functionality so You don't need to add any code or plugin for that.
Hope this will work for you.
Thanks.

Show All Configurable Product Attributes without Selection

I have products on my site with two configurable attributes: color & size. Right now, with default magento settings/coding the second attribute is hidden until the first is selected.
Example 1: Breaker Rashguard
I would like to show all options for both attributes without any selection being made, or by having a default selection for color on each product (by default, first option in list). I've seen this done on Gap's website:
Example 2: Heathered Oxford Shirt
I am using Amasty's Color Swatches Pro extension to replace the drop down selectors with color swatches. From what they can tell me, their extension does not rule this option and has no effect on any changes made to core code.
Can someone explain how to show my products like example 2?
There are differences between attribute and super attribute.
Attribute - You create the custom product options.
Super Attribute - The system automatically creates when if use one cofigurado product
In your case is super attribute that is enabled if the former is chosen, i believe that by css you will not get a solution, will have to analyze the source code.
When the first option is selected, it enables the second option if it has stock with those attributes.
Maybe if you do not use stock quantity with the configured products should display without disabling.

woocommerce: how to add new fields to variations form and show them on frontend

using last versions of wordpress, woocommerce and cheope (theme).
the question: how to
add some extra fields in variations form (text and image field types)
show them on frontend so that their values change accordingly on changing of attributes-select values.
e.g.: the site sells candles and uses variable products, for each kind of candle has several dimensions (with specific different prices), each of which has different duration.
The duration is an important element that I want the user to be informed about.
The same to show the available colors all together.
Unluckily in the standard variation form there is no field where I can insert these or other features.
some help please?
updated 07-August-2013
I succeeded in adding to variations form a new field displayed on back-end, as you can see here, by inserting the code you can find here (please see the comments too) in the function.php file of the theme.
Now, what I’m not able to do is get this field to display with each proper value on front-end (please take a look to the last comment in the above linked page).
Any tip or trick?
thanks
1)Add product attribute and check checkbox Used for variations and Visible on the product page
2)go to variations and add new and fill all fields price and stock must add on them
Your producr display variations and their data

Resources