Hi I wondered if someone could help with a Jquery issue in the shopping cart?
I have a filed upload script set up with attributes that displays a loading bar for progress. So far it works and you can see the loading bar. However unfortunately it adds two of the same product to the shopping cart, one displaying the uploaded filename and the other that doesn't.
I have made the uploader using a script which can be found here. http://www.imarque.com/jqupload/index.html and my uploader can be found here http://151.252.1.60/~imarque/new-sit...e=product_info
This is on every product page. If you try to add a file you will see that the loading bar appears and the file uploads successfully even though in the cart it doesn't display the 'File upload success' message.
I have amended modules/MYTEMPLATE/attributes.php to include the following on the file upload line like so.
//THE CODE BELOW IS FOR THE FILE UPLOADING BAR SCRIPT//
$tmp_html = '<input type="file" class="fileupload" name="id[' . TEXT_PREFIX . $products_options_names->fields['products_options_id'] . ']" id="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '" /><br />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="http://www.imarque.com/jqupload/js/vendor/jquery.ui.widget.js"></script>
<script src="http://www.imarque.com/jqupload/js/jquery.iframe-transport.js"></script>
<script src="http://www.imarque.com/jqupload/js/jquery.fileupload.js"></script>
<script src="http://www.imarque.com/jqupload/js/upload.js"></script>
<div id="progress">
<div class="bar" style="width: 0%;"></div>
Obviously from the above you can access the script URL's so you can see how its working. The offending script appears to be this one http://www.imarque.com/jqupload/js/v...y.ui.widget.js, I know this because I have played around and deleted it from the code to find out what is causing the cart to add two of the same product. So its between this and the original shopping cart php files or Jscript.
I wondered if there's any coders that could shed any light on what is causing this issue and help me resolve this upload problem?


Reply With Quote
