Validation in Miva store not allowing users to enter information into text boxes - miva

We are working on an online Miva store for a client which can be viewed here: http://www.labwear.com/shop/metrohm.htm. When a customer goes through all the steps: selects lab coat color, selects size, selects logo, selects embroidery color, and selects embroidery style users cannot enter anything into the embroidery name text box. If anyone has any idea why this is happening please let me know.

Someone set the HTML5 attribute "readonly" on it. Miva Merchant doesn't use the HTML5 doctype or attributes by default, so someone set this. Take that off and see if it fixes the issue.
Also, you have JavaScript issues. You're trying to declare variables, but you're doing them like this:
var var_mvt = 1964M
Instead of:
var var_mvt = "1964M"
So that's stopping the rest of the JavaScript from executing (which might be triggering the removal of the "readonly" attribute).

Related

CKEditor Image Plug-In: Possibilities for providing aria-describedby content

I want to allow authors to enter long descriptions in the CKEditor image plug-in dialog, descriptions which then are available to screen readers via the aria-describedby attribute. In our use case, authors work in a WYSIWYG mode; they're not expected to edit raw HTML, so we can't ask them to enter an ID in the image dialog, add a corresponding ID to some other element, etc.
It's a trivial matter to enhance the CKEditor image plug-in dialog to have a field where the author can enter a long description to accompany the short alt description. The result could be something like <img data-long-description="this is a long description" alt="short description" />. But what we need is <img aria-describedby="longDescriptionID" alt="short description" />, where longDescriptionID is the ID of some element on the page (hidden from sighted users or not)....
I have a couple of possibilities in mind. (1) keep the image plug-in doing what it does: output an <img /> tag, as in the first example, and then some other code in the end user-facing view has the responsibility to find data-long-descriptions, replace them with IDs (randomly generated, say) in an aria-describedby attribute, and somewhere in the view insert corresponding content hidden from visual users, so that screen readers will pick it up.
Possibility (2) is to have the image plug-in output something like <span class="accessibleImage"><img aria-describedby="randomID1" alt="short description" /><span id="randomID1" class="accessibleLongDescription">This is nice, long description of the image blah blah blah</span></span>, where .accessibleLongDescription is hidden except to screen readers.
It's good that you're looking into this. More detailed descriptions for images are often useful. A couple of thoughts...
It isn't just people who use screen readers that find longer descriptions useful. People with cognitive disabilities will often benefit from more detailed explanations of complex images. If you can make the descriptions available on demand to anyone, this will help more people.
When the description is inserted into the DOM it needs to be immediately after the image it relates to. Screen readers use a translation of the DOM known as the accessibility tree to access content, so DOM order is important.
So one possibility is to combine your methods - search/replace the data attribute as you suggest in your first method, then insert the description based on the pattern in your second method.
Another possibility might be to use a disclosure widget pattern instead. Represent the image as the trigger control for the disclosure, and make the detailed description available when the widget is expanded.
A reasonable disclosure widget pattern is here.

Advise on ADF layout for email contacts

I have a requirement to show email recipients contact in a window. I am confused on what ADF layout is to be used.
Requirement is :
|To: <.input field> <.Contact name1> <.Contact Name2>... |
Contact names can be upto any number. So, if it takes up maximum width, next contact should be in the next line.
As far as i know, PanelGroupLayout can be either horizontal or vertical. So it doesnt help me here.
PanelFormLayout arrranges the contacts vertically first. So i cant use it here.
Is there any other ADF component that can be of help? Or do i need to write code and programatically create components with different layouts?
You could use the PanelFormLayout to layout field and their prompts and try changing the rows to 1 and maxcolumns to however many you have. Or the PanelGridLayout, depending on ADF version, which you don't mention.

CKEditor and HTML in Xpages

I am understanding this better but still not there yet.
I have a notes document with a rich text field. I want to edit it in Xpages, so that the user can enter text for an email that an agent will generate. The idea is that the user should be able to enter styled text, hopefully including pasted graphics, and this is saved to the rich text field in such a way that a later agent can copy that field to the body of an email.
On the form I have checked the field "Store contents as HTML and MIME.
In the Xpage I have bound the CKEditor directly to the field (can bind it to a scope variable if necessary).
The code in my agent is as follows:
Set rtItmFrm = emlDoc.getFirstItem("Body")
Set rtItmTo = New NotesRichTextItem(mail,"Body")
Set rtItmTo = rtItmFrm.Copyitemtodocument(mail,"Body")
Any further suggestions on reading up on MIME/CKEditor etc would also be much appreciated.
Bryan
=========================================================================
I just discovered how to modify the CKEditor in Xpages (the Rich Text Control). I have the full menu and one or two more things turned out. However, I am really puzzled by how it treats HTML. I would like to put a template for a nice HTML email (like a newsletter). Anything even a little complicated it munges and the output is messed up.
I read enough online to understand that it is not supposed to be a HTML editor, but I am really having trouble getting the results I want. I would love to put some basic skeleton HTML in there, but everything but the simplest code doesn't work.
Is there anyway to import HTML and it not get messed up using this editor?
as Per and Stephan said, Have a look at ACF filtering that is 'server side' (This is not related to CKEditor itself, but it is related to XPages).
If you have a look at the inputRichText control you will see 2 properties.
htmlFilter
htmlFilterIn
These properties determine how to filter Html on the way in to your data, and also on the way out.
This can be used to strip styling out, and also to prevent dangerous tags like some bad code here etc.
By Default the htmlFilter is set ACF (Active Content Filtering) if you look at the default rules, you will see it strips things like 'margin' out.
see /properties/acf-config.xml-sample
There is a filter called 'identity' which means don't filter anything, however beware if you use this you are not protected from and maliciously entered html.
You should look into defining your own set of rules for your ACF filter, this way you can choose which elements to remove. There is a section in Mastering XPages book about this.
If you still have any trouble, then there are some settings in CKEditor config which also control ACF (totally separate to XPages server side)
I don't think CKE changes the HTML, it is the writing back to a RT field.
Try and bind your RichText Editor to a scoped variable instead of a RichText field. This way you have access to the raw HTML and can use that to generate a MIME email. You might want to have a look at Mustache for mail merge.
Use this article series as starter how to prepare CK editor to make this possible.
And as Per mentioned: check the filtering.

Tumblr: how do I remove the description/sidebar box on the submit page in the default Peter Vidani theme?

I have a tumblr account that has submission enabled, and I have a short description with a form in the "description" area that appears on the sidebar. However, this description also appears on myblog.tumblr.com/submit. I'd like to remove it.
I looked at the documentation on http://www.tumblr.com/docs/en/custom_themes#navigation, but haven't been able to figure out how to prevent the sidebar description from showing at the top of the submit page.
Can anyone help?
I'm not sure if I understood your question correctly. But if I did, a work around would be using jQuery to check if the current url contains the string /submit and simply disable the sidebar, or the element that contains the description.
I don't know jQuery but I know it's possible. I'd suggest you to look into this post:
How to check if the URL contains a given string?
and combine it with this line (replace the "alert part")
$("#sidebardescription).hide();
Another solution would be if Tumblr provided you with a way to only render for specific pages. They usually do that. I'd look into this part {block:SubmissionsEnabled} {/block:SubmissionsEnabled} before I go with the workaround.

Magento - adding a new field to the product options in admin

I'd like to add a new tab to the 'catalog->manage products->product information' page in the admin. Underneath the 'images' tab, I'd like to add a new tab for video, with a simple text input for adding a video url, which I can then grab for the frontend.
Anyone any ideas where the files are that I need to edit? I've been looking for the last couple hours with no joy. I found the list of current options in Mage_Catalog_Model_Resource_Eav_Mysql4_Setup but can't figure out how to add to them...
Seems it gets some from Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs. If I copy one of the tab sections here and change the title to Video, I can get it to display in the tabs on the left. But how do I then add the options for it?
What you are trying to do, from the sounds of it, is to create a custom field and add it to your catalog data. The good news is that you don't need to muck around in the PHP for that.
Head to Catalog -> Attributes -> Manage Attributes and create a new attribute for yourself called "Video URL" (or something to that effect). This will probably be a text field, and you may want to hide it from comparison on the frontend of the site (select "No" for all those boxes at the bottom of the form).
Once you've created an attribute, you will need to add it to an attribute set. If all your products are of one "type", and if you didn't create any other attribute sets, this should be only one step. Head to Catalog -> Attributes -> Manage Attribute Sets and create a "New Group" called "Video" and drag your new video url attribute into it. Save the attribute set and you should now have your new tab.
The only complication from what I read in your post could be positioning it underneath the images tab. Magento adds several tabs statically (the long way, in the PHP) and doesn't generally obey ordering of the tab groups. Consider the time tradeoff.
Hope that helps. Thanks,
Joe
Per your other comments, for the URLs a simple attribute would work but files would tend to be more difficult. To add a custom tab, as you said, you can edit (or in the case of a plugin, override) Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs::_prepareLayout and add your tab. You'll need to add a block or template to display your tab contents.
After that, you'll need to store the data somewhere. Looking in Adminhtml/controllers/ProductController, you should be able to hook into the catalog_product_prepare_save event to get data from $event->getRequest() and push it onto the product or save another entity as necessary.
I'm not sure how well file saving semantics would work on a product, so you may want to do your own data storage in the extension and then provide something like a getVideoForProduct method to retrieve it.
Then the only thing left to do is modify the catalog/product/view.phtml template file to include your thumbs and create a controller in your extension to provide a modal w/ the video (or do it in JS).
I know that's a bit of a general answer, but it's the rough path you would need to take for tabs. Let me know if any specific part of that is unclear.
Thanks,
Joe

Resources