OpenCart 3 add a hidden option - filter

I have an OpenCart store where each product has multiple sizes, they also have different colors but each color is a different product.
Now I want to be able to filter the products by size and color too using Brainy Filter.
However that would mean that I have to add Color option to products. The problem is that this color option will have only one item (white for example, or blue, or green, etc.), so it is not necessary to show this option to the customer [see image].
I'm guessing that I can count how many items an option has and if it's less than 2, then apply a class to hide the it, however the option is still visible in cart/checkout/order history and other pages.
My question is - is there any better way to do color filtering than to create a Color option (not using Tags)? If not, is there a clever way (except hiding it with CSS on every page that it's visible) to hide this option from the customer since they don't really need to see it.

Related

Magento: Detailed Image on Mouse-over for Product Attribute

I would like to show a detailed image on mouseover for each of our options.
This is exactly what i am after:
http://www.potterybarn.com.au/textured-solid-pillow-cover
Any idea on how to do that? Or is there a plugin available for that?
Detailed image is usually called product zoom function and it's present in most of magento themes including default ones. It shows original image on zoom function and smaller version of the same image by default.
Images for options function is called color swatch, most of the modules aren't free. But the recent magento 1.9.1 has this feature for free in their new default theme called rwd. There are both color swatch and product image zoom features. You can look how they've done it and extend their solution if you need something more
The easiest way to achieve option image itself on hover would be to use image of resolution you need to have on hover in your configurable product. Then change html of configurable swatch options file. Currently it shows just one image, you can add the same image wrapped in some block. Then change the size of one image to be small, hide block hide big one and show it on hover via css/js.
File with code for swatches: app/design/frontend/rwd/default/template/configurableswatches/catalog/product/view/type/options/configurable/swatches.phtml
/skin/frontend/rwd/default/js/configurableswatches/swatches-list.js
and change line no: 52 "click" to "mouseover"
Then check, if correct please vote me.
Thanks.

Magento 1.9.1 Swatches - Image Groups

After upgrading to 1.9.1 I have the colour swatch selection showing the right product image depending on the colour swatch selected on the product page.
Each product has a few alternative views per colour. These are shown below the main image as predicted as "More Views"
My problem is that ALL colours varients are shown in "More Views" when ideally only the alternative images of the colour selected should be shown.
Has anyone found a way to group the main image and it's alternative colour variant to show dependent on the swatch selected? Please see screen shots.
In 1.9.1 there is a filter inside app/design/frontend/rwd/catalog/product/view/media.phtml that excludes any image with a Label matching any of the color options. All other images you upload on the configurable product will be shown.
On the configurable product, go to images tab and check your images:
You need to have one image checked as Base, Small and Thumbnail
(optional) One or more additional images to show below "More Views" (from one color option only). Do not upload all color options.
One image per each color option to be used as a swatch. Label each one with the color name and add the suffix "-swatch" (i.e. Light Green-swatch)
The RWD theme of Magento 1.9.1 will only swap the main image when you click on a swatch color. Images below "More Views" will remain the same.
You can find more info on this article
I was also wondering about this... but I think the media gallery won't change out of the box in 1.9.1. However, you might be able to show and hide some image groups via CSS/JS to only show the associated images of the currently selected option.

Powerpoint - want to define a color palette that is NOT a color scheme

I import Spotfire graphics into Powerpoint quite frequently. Spotfire has its own specific color palette, which aren't the standard colors used in powerpoint, at least I don't think so.
I often must create my own legend or for other reasons match the spotfire color palette, and I do this by entering the RGB codes for the spotfire colors. I would like to do this one time and have the spotfire color palette always available in powerpoint without having to re-type.
I do not think I want to use a color theme, because I want my colors to stay consistent if I end up using different templates (themes). That is, I don't want to call spotfire default blue "Accent 1", because if I change background templates (themes) I think it will overwrite Accent 1 with the new template's Accent 1.
So I want a color palette that is always available to me regardless of what theme I choose.
Any thoughts?
You're dismissing themes for all the right reasons. They wouldn't work for what you're after. You'd pretty much need to buy or write an add-in to do what you want.
For example, it might install n buttons on the toolbar/ribbon, where n = the number of colors you need on your palette. When the button is clicked it sets the fill, for example, of the currently selected shape/shapes to the appropriate color.
You could have different sets of buttons for fill, outline etc, or have the code figure out whether the user has pressed, eg the CTRL key. Click = set the fill, CTRL+Click = set the outline.
Because I was curious I decided to attempt to create a simple Add-In that will allow you to select a chart, series in the chart, and then apply colors.
You can download from Google Docs (revised link)
https://docs.google.com/file/d/0B1v0s8ldwHRYMFFPZ29FNmI0TkE/edit?usp=sharing
The file is saved as a PPTM to expose the code modules. Save As a PPAM and load the Add-in; it will be available from the Add-Ins command bar. I have tested briefly and seems to be working.
Here's the nuts & bolts of it:
First declared several custom colors as Public Const variables. These can be modified using the long value (converted from RGB) to suit whatever you need.
The macro requires that the selection be a Shape, and further that the Shape .HasChart = True. There is some logic to trap these conditions.
A user form has a ComboBox that populates with a list of Series from the selected chart, and 8 CommandButtons colored for each of the defined colors, will send that color to the chosen series.
You could add additional CommandButtons and colors as needed, or tweak the existing code to suit your specific needs.
Although the slide templates have a default color theme attached to them, you can switch slide templates and still use any XML color scheme at your disposal.

Configurable Products - Change Dropdown based on first dropdown selection

I need to set up a product that is very similar to a configurable product but where the options can change depending on the attribute that has been selected. For instance, if I had the following attributes Size and Colour. Lets say I had small, medium, large for the size attribute. On my product, red is only available in the medium size but green and blue are available in all sizes. I would need the colour drop down box to change based on the selection of the size drop down.
Is this possible?
Note: I know this isn't strictly a programming question but I have seen a lot of other "setup" questions about magento on SO that haven't been closed so assume this appropriate.
You can use Configurable prodcuts to do this for you. Configurable products will only allow the user to select variations you have setup in the store.
for example:
If you have a configurable prodcut with Size and Colour Attributes, and add variations as follows:
Size: S, M, L
Colour: Red, Blue
You then only add (and enable/make in stock) Variations (simple child products) with combinations where Red is available in S,M only, and Blue is abailable in size L.
When a user tries to buy the product they will be asked to select a size, if they then select Size: S then the Colour dropdown will dynamically change to only allow the user to select Red as an option.

CKEditor Defining custom margins for inserted image

I met a limit with quite typical operation. Simple document:
http://i.stack.imgur.com/JNI9v.png
As you can see, image has right and bottom margins. But... CKEditor image dialogue provides VSpace and HSpace parameters which influence together to Top-Bottom or Left-Right twin values and adds unnecessary top and left margins:
http://i.stack.imgur.com/vo3oC.png
Of course, users won't use pure code to define this in style="..." attribute. So, how to allow users insert images as shown on the first image? Maybe exists CKEditor plugin or patch... and i just can't find it.
Another, maybe even a simpler way, to achieve what you want would be to use a predefined set of styles for images and use the "Styles" combo to apply one of preselected classes. This way the styles used for images could be more consistent.
To see what I mean you can check the "Standard" demo - click on an Image and in the "Styles" combo select "Object styles -> Styled image (right)"

Resources