Tuesday, September 29, 2009

Extension Manager : Install

Extension Manager : Install: "This module allows updating of product information via AJAX from the product browse page.
Changing product information normally takes a long time - now it's a breeze!

1. Modify your browse templates (found in /components/com_virtuemart/themes/default/templates/browse) to include the following lines:

<div class='AJAX' pid='<?php echo $product_sku ?>'>
<div class='AJAX_field' field='product_name' title='Name' content='<?php echo $product_name ?>'></div>
<div class='AJAX_field' field='product_s_desc' title='Short Desc' content='<?php echo $product_s_desc ?>'></div>
<div class='AJAX_field' field='product_desc' title='Description' content=' '></div>
<div class='AJAX_field' field='product_price' title='Price' content=' '></div>
<div href='<?php echo $product_flypage; ?>' class='AJAX_detail_link'></div>
</div>

2. Publish the VirtueMart AJAX updater module on All pages, with Access Level set to 'special' (admin only), in a position used by your template.

3. Log into the front end of your site as administrator, and browse the products. Textboxes should appear under the products, through which you can edit the product data. Please note that both price and description will be empty initially, but will work as expected.

4. It is highly recommended that you password protect the modules/mod_vm_ajax_update/AJAX directory to stop malicious use. Ask your web host how.

The AJAX updater uses JQuery. If your site already uses prototype, or a similar javascript framework, they may conflict.

If you are keen to be able to change the SKU using AJAX, please email me at josh@neonascent.com . It is a possible future improvement."

No comments:

Post a Comment