Woocommerce Show attribute in backend with custom value - attributes

Wordpress - Woocommerce.
I need for old and new product to show in the 'attribute' page all the attributes by default, maybe with a custom value if is possibile. So i don't need to insert one by one for each products but i can just edit the default.
Example:
All my products have Weight and lenght. I don't have the time to add a product select the attribute etc. etc. i want to show in the attribute section
Weight: EDIT
lenght: EDIT
(...)
Color: EDIT
IS that possibile :( ?
thanks
*Sorry for my bad english

Related

Shopware 6: Product Slider data is null when use manual assignment

I have a issue with the product slider.
First issue: In administration, i added a product slider that using dynamic product group and a product slider that using use manual assignment.
I created a my resolver class that inherit from ProductSliderCmsElementResolver for loading data on storefront.
But on Storefront only display data from dynamic product group , data from manual assignment is null.
Second issue: On Storefront can’t display product’s cover (I still using Product Slider). Do I need to do anything at resolver class ?
Thank everyone.
It was fixed by the OP by extending their resolver from ProductSliderCmsElementResolver. By this the existing logic / template is used and the data is displayed.

Drupal 8 - how to customise search result template

I have a custom content type with several fields like Price, Product Summary, Product image etc. Is there any way I can access these fields separately on search result page?
I printed the rendered array on mytheme/item-list.html.twig using kint(item.value) which shows that I can only access title, url and type separately like {{ item.value['#result'].url }}, {{ item.value['#result'].title }}. But don't see variables like product_image, product_summary etc. in rendered array.
According to Twig template suggestion the template I need to override is search-result.html.twig. So I copied /core/themes/stable/templates/content/search-result.html.twig to my theme's folder. However, the {{ snippet }} variable does not have information I want to access.
I went through the following steps to customise the result output:
Went to /admin/structure/types/manage/product/display (Structure > Content Types > Product > Manage Display). Turned on Search Index and Search result highlight input.
Navigated to Search result highlight input tab and added (enabled) two fields Product summary and Product price
Went back to search result but I still cannot see the those variables in rendered array.
Can somebody please tell me the best way to accomplish the above?
#Subrata Sarkar There is one option. Firstly,install two module search_api and search_api_page module from drupal.org
https://www.drupal.org/project/search_api
https://www.drupal.org/project/search_api_page
Add server and index in search api.
Add the fields which you want to display on page within index and after all configuration indexed all your data.
After this create and configure search page.And choose view mode option and select a view mode ex: Search result highlighting input or Search index etc.
Hope you get your desired result on search page.For more information,
https://www.youtube.com/watch?v=dNilEVQu94I

Add finding attribute by name in Opencart Admin panel: Catalog - Attributes - Attributes

How to implement Attribute to find his own name in the admin area in Opencart : Products - Attributes - Attributes? Is that there is a separate field and simply by driving into the field and displays the name of the attribute is an attribute, as usual searching for items in the admin by name, but only with attribute
It's hard to understand what you are asking, but if you are trying to use attributes for products then you must first define them at catalog>attributes>attributes.
To List attributes in the Products tab you will need edit these files
admin>view>template>catalog>product_form.tpl
admin>controller>catalog>product.php
If your understanding of PHP or Opencart isn't very strong it will help you to copy data from the attribute.php controller to the product.php controller.
As for the search function, this is something I haven't done before but you could try using the search function on the front of the website as reference.
I recommend working through this as best you can then asking more questions if or when you get stuck.
*Update
Ok so since HTML is your strenth it will be smartest to start from there. Open any of these files (the ones that have the data you need).
admin>view>template>catalog>attribute_form.tpl
admin>view>template>catalog>attribute_group_form.tpl
admin>view>template>catalog>attribute_group_list.tpl
admin>view>template>catalog>attribute_list.tpl
Then work backwards with what you see. The tpl will show variables that look like $attribute, track these back to
admin>controller>catalog>attribute.php
admin>controller>catalog>attribute_group.php
And you will see how all the code is used to pull the data from the model and format it if necessary.

Drupal6 - product comparison

Hi
I have not using any shopping cart module, just created a content type (product) and defining several field(attribute) for each product feature.
I want to ask is there any module in Drupal for product comparison or field comparison?
Thanks
No, but there is a way to do it with the Flag module and Views. It will take more work than just turning on a module, but the outcome is the standard product comparison you're looking for. See this article.
The article is no longer online: here the content of the original post.
Ubercart Product Comparison
For me, using Ubercart in Drupal as an e-commerce solution for your website is the way to go. I have been using Ubercart for years now for a number of web design and development projects, and there are a massive amount of contribute modules to beef it up. One feature that I have been keen to work on is a Product Comparison feature, which would allow users to select products and have them display on a page, providing them with a nice and easy layout to easily compare their selected products.
After searching around the web, I found a few articles and posts from people looking for this feature, asking how it could work or if anyone had done it, but couldn’t find anything that said “here it is, this is how it can be done”. So, after a little bit or research and a bit of a play, I have come up with a solution which is not that difficult to achieve and only requires some already existing Drupal modules with just a few tweaks.
Note: This tutorial assumes that you already have a working ecommerce site with Ubercart installed. Best to also try this on a test environment and not a live website.
Step 1. Download Required Modules
Download, install and enable the following modules.
Views (I used 6.x-2.11, I haven’t tested it with any other releases)
Flag (I used 6.x-2.0-beta3, I haven’t tested it with any other releases)
Step 2. Flags configuration – Setting up your “compare”
Once you have enabled the Flags module, go to the flags administration page at /admin/build/flags.
Click the Add link, enter the name of your flag (something like “compare”), and leave the flag type as “node”, and submit.
On the next screen you will need to configure your new flag. Complete the following fields (changing the values if you like). I setup my configuration so only registered users of the website could compare products.
Title – Compare Products
Flag link text – Add to compare
Flagged message - [title] has been added to your compare
Unflag link text – Remove from compare
Unflagged message – [title] has been removed from your compare
Flaggable content – Product
Check “Display login link for anonymous users.” and for anonymous link text add “[login] to add to your compare”
For flag access, check flag and unflag for authenticated users
Under Display options select “Display link on node page” and “JavaScript toggle” as link type
Click submit to save your flag.
With the settings we used, the “flag link text” should now display on your product nodes. Clicking it should make the “flagged message” appear and the link changed to your “unflag link text” using JavaScript.
So what we are doing here is just flagging nodes – it’s actually pretty simple. We are flagging/unflagging them as “compare product”, so you should now be able to (by clicking on the link provided on your products) add and remove products to compare on your website.
Now we have done this, we need to create a page to display our “flagged” products, in which this case is the products we want to compare.
Step 3. Creating out Compare Products Page
Go to the Views Administration page, enabling the Flag module creates a default flag view. You can use this as a reference, or even change this view to what you need, it’s totally up to you. All we need is a view with (at least) the settings explained below.
DEFAULTS
Basic Settings – Use at least the following settings
Title: Product Comparison
Style: Table
Items per page: Unlimited
Access: Authenticated user
Empty text: Full HTML
- You have not yet added any products to compare. Click the “Add to compare” link when viewing a product to add it to this page.
Relationships
Add the following relationship:
Flags: Node flag
- label: compare
- check “Include only flagged content”
- flag: select the flag you created in step 2
- by: current user
Fields – You can put whatever fields here you would like to show up against each product. You must include the Node Title, and ideally you would want to show a thumbnail of the product, its price and description and the unflag link to allow users to remove it from this page. I have the following fields for my compare:
Content Image using an imagecache, linking to product
Node: Title linking to product
Flags: Flag link
- Relationship: select the one you added
Product: Sell Price
Node: Teaser
Filters
Node: Published Yes
AND SAVE
Now add a new page display view and give it a URL, then save. Navigate to your new compare page using the URL you entered. If you haven’t “flagged” any products yet, go do so and once done you should see those products displayed on your Compare Products page!!!
But, there is one slight issue. Because we needed to use Style: Table to get the layout to better suit a compare list, it still doesn’t display it the way we need it too. We want to display each of the products horizontally, with each field label shown on the far left so it is easy to compare our products. To do this we need to retheme the table style for our view.
Step 4. Theme the table output of the view
Under Theme: Information for our view, it displays a list of all the possible templates for the display plugin and for the style plugins. Look for the list titled Style output. This is what we want. It lists the possible templates we can use to change the theming of the style output. The first one it displays is the generic template for the table style output but we don’t want to use this one, because if we do we could effect any other table style view that may be on the site. So best to use the next one across, mine was called views-view-table–flag-compare.tpl.php.
Create a new php file and name the file to the template name you want to use. In my case my file is named views-view-table–flag-compare.tpl.php.
Paste the Drupal 6 code from here http://drupal.org/node/174578 into your template file.
Then place the file in your themes directory – and presto! Your comparison table should be laid out more like a comparison style grid. Below is a screenshot of what my Comparison page looks like after a little bit of extra styling.
Try this module: https://drupal.org/project/comparison
Allows the comparison of the attributes of two or more nodes by generating a table. A checkbox is added to nodes to allow them to be included in the comparison. If two or more nodes are selected a link is added to a page with a comparison table.

Is it possible to extend Categories in ExpressionEngine 2

we are currently weighing up what cms to use with Expression Engine 2 being a strong candidate.
We would like to create a bilingual site where the categories would need to be in both languages.
I see that a category has the following fields
Category Name,
Url Title,
Description,
Image url,
We would also like to add "Category Name French" and "Description French" to each category and have them editable via the control panel form.
Does any one know if this is possible?
Any pointers much appreciated
Beyond the standard ExpressionEngine Category Fields — Category Name, Category URL Title, Category Description, Category Image URL — you can add as many additional Custom Category Fields as you see necessary.
You can add/edit custom category fields in the ExpressionEngine Control Panel at:
Admin > Channel Administration > Categories > Manage Category Fields
This would allow you to add your "Category Name French" and "Description French" fields to each category and have them editable in the Control Panel.
.
I use category parents to group the individual categories, you can then easily output the required categories based on language, either via the parameter "category_group". You can then use all the default category fields and custom ones.
Basically:
English
-- category 1 (in English)
-- category 2 (in English)
-- category 3 (in English)
French
-- category 1 (in French)
-- category 2 (in French)
-- category 3 (in French)
I believe the accepted best practice for multi-lingual sites in EE2 is to use the commercial add-on Transcribe. http://eeharbor.com/transcribe
The easiest solution around bilingual categories is writing the name of the second language category in the category description input field and then use {category_description} as the name tag for that language. That is not useful if you need a description for both languages though.
this might work for you:
I haven't used EE2.0, but in EE 1.X you could create custom category fields.
Create a "{fr_category_description}" for instance
then have a read at this tutorial - http://expressionengine.com/wiki/Multi_language_site_alternative/
I implemented this on an english/welsh website and it worked very nicely
URLs look like site.com/COUNTRY_CODE/template_group/template and serve content based on this.
works by assigning a variable based on the country, then within your templates you can do:
<h1>{{country_code}_my_field}</h1>
which will translate to:
<h1>{en_my_field}</h1> for site.com/en/ or <h1>{fr_my_field}</h1> for site.com/fr
you just need to create fields with the country code as a prepended and you're good to go.
let me know if you need any clarification, can provide code from my live site.

Resources