Latest News: (loading..)
gadlol

Alternative Administrator Categories/Products Page Addon (jQuery, ajax edit)

50 posts in this topic

Hello this is the support forum for

 

Alternative Administrator Categories/Products Page Addon (jQuery, ajax edit)

 

by gadlol

 

Author: John Barounis - www.jbaron.gr

 

The first version http://addons.oscommerce.com/info/8317 has some bugs that are fixed in the new upcoming version 0.2 .

 

Version: 0.2:

 

New features:

  • Abillity to choose what column to display (image, model, quantity, tax class, weight, manufacturer e.t.c.)
  • View edit product description (using ckeditor)
  • Product preview dialog while editing description (before even submit any changes)
  • Cool attributes system
  • language select
  • count products
  • count subcategories
  • choose what products to display from: in stock - out of stock - both
  • dialogs
  • basic editing
  • Manufacturer selection by select menu
  • Tax class selection by select menu
  • Add sort ordering to buttons (jquery ui sortable)
  • and much more

Improved code:

  • Now using sessions
  • Dry code
  • Removed unused files and folders

Have a look at some screenshots i took:

 

jbaron.gr/tbl/tbl1.jpg

jbaron.gr/tbl/tbl2.jpg

jbaron.gr/tbl/tbl3.jpg

jbaron.gr/tbl/tbl4.jpg

jbaron.gr/tbl/tbl5.jpg

jbaron.gr/tbl/tbl6.jpg

 

It will take me some time to release version 0.2 because I am just fixing some bugs and cleaning the code...

Edited by Jan Zonjee
al3ks likes this

Share this post


Link to post
Share on other sites

John,

This sounds good. Looking forward to using this add on.

It would be nice if something like this is in next full release.

Reading in the forums today I ran across a mention that version 2.3.3 has issues with some add-ons using jQuery. Hope I "miss-understood" that.

Tom

gadlol likes this

Share this post


Link to post
Share on other sites

The new features seem really cool, looking at the screenshots I can't wait for the new version!

 

Currently using the first version and it's great.

gadlol likes this

Share this post


Link to post
Share on other sites

Hello, after a long wait.. I finally have managed to release a beta version 0.2 of my addon.

 

You can download it from here: tbl

 

Installation instructions are included in the zip file.

 

You can also view a small showcase video on youtube (better view on fullscreen hd):

 

So I need your help. Please report any bugs you may find by replying to this forum post or by sending me a message to contact [at] jbaron.gr

 

Although this is a beta version, it is close to final. Its fully working.

 

I want to thank you in advance for using my addon...

 

John Barounis

 

 

(note: I have not submited it, on addons page yet, just waiting for any bug - error reports e.t.c.)

Edited by gadlol

Share this post


Link to post
Share on other sites

I haven't see any responce yet.

 

Has anyone tested the 0.2 version?

Share this post


Link to post
Share on other sites

Hi John

Thanks alot for such a cool add on, Could you please confirm if it works on osCommerce2.3.3? I actually tried it but its not working properly.

Thanks

Share this post


Link to post
Share on other sites

Yes I have tested it on 2.3.3 and worked fine.

 

Can you reply me any bugs - errors you have found?

 

What is not working properly?

 

John

Share this post


Link to post
Share on other sites

Hi John

My apologies, I just checked again and it is working perfectly fine. I think i tried it straight after uploading and doing all the changes probably thats why it wasn't working properly earlier.

Thank you ever so much for such a wonderful add on which will save me loads of time.

Look forward to the final version.

regards

Liz

Share this post


Link to post
Share on other sites

Hi John

I am back again. I've just came accross a problem, I edit a product description and submit changes it did change the product description but if I click on Preview button it gives error. Rather than accessing page on website its trying to access localhost. Please see the error below.

Second thing is can we add new product through this add on?

 

Google Chrome's connection attempt to localhost was rejected. The website may be down or your network may not be properly configured.

Here are some suggestions:

  • Reload this web page later.
  • Check your Internet connection. Reboot any routers, modems or other network devices that you may be using.
  • Add Google Chrome as a permitted programme in your firewall or antivirus software's settings. If it is already a permitted programme, try deleting it from the list of permitted programmes and adding it again.
  • If you use a proxy server, check your proxy settings or contact your network administrator to make sure that the proxy server is working. If you don't believe you should be using a proxy server, adjust your proxy settings: Go tothe Chrome menu > Settings > + Show advanced settings > Change proxy settings... > LAN Settings and deselect the "Use a proxy server for your LAN" checkbox.

Error 102 (net::ERR_CONNECTION_REFUSED): The server refused the connection.

Share this post


Link to post
Share on other sites

Hi Liz....

 

In order for this to work you must edit 457 line of the tbl.php and change according to your store path.

 

//Used by iframe when previewing editing product description
//Change according your site. Exmp: 'http://www.mywebstore.com/product_info.php?products_id='
var product_info_path='http://localhost/osc2/catalog/product_info.php?products_id=';

 

I will change it in the final release, so this product_info_path variable will be auto generated...

 

Thanx a lot Liz...

 

regards

John

Share this post


Link to post
Share on other sites

Hi John

Thanks its working now, One more thing I forgot to mention, when you go in description edit and hover your cursor over the buttons in toolbar the caption appears in Greek language, I wonder if I can change it to English?

Second thing I asked earlier can I add new products through this add on?

regards

Liz

Share this post


Link to post
Share on other sites

Yes you can change it easily.

Just find the dialogs.js which is located in the ext/tbl/js folder and add after the 72 line

 

language: 'en',

 

its where ckeditor does the magic... So you gonna have Something like this:

 

$('#description_editor').val(resp);
CKEDITOR.replace( 'description_editor',{
language: 'en',

 

 

NO, im sorry, you cannot add new products through this addon.

 

In the next release this option will be added.

I will also add a new cool attributes manager page (tbl_attributes.php) which you can easily create and edit atributes with. Its under development..

 

regards

John

Share this post


Link to post
Share on other sites

Hi John, nice work! I'll have to test it out, given time.

 

Bon Noel!

 

Sara

Share this post


Link to post
Share on other sites

Thanx a lot Sara...

 

Looking forward for any bug - error reports

 

Regards John

Share this post


Link to post
Share on other sites

Hi John, You are a genius! That add-on is way sweet! I want to use it on my OSC 2.3.3 but have a question. I have this store setup for a client that sells heated clothing and accessories and I pretty much done except one little glitch... And from what I have been reading, this issue is not a new one. I just don't know or can't figure out the best way of tackling it and I am hoping for your help! He sells a jacket and the sizes are XSmall, Small, Medium, Large, XLarge and 2XLarge. How can I setup the individual stock/quantity amounts for each one? For right now I can only set the stock/quantity amount for the jacket but need to break it out to setup amounts for each size. Some people have told me to use QTPro but it looks like overkill for what I want it for. I just want to manage how many sm, med, large, XLarge & 2XLarge sizes there are in stock for a product.

 

Your help is so appreciated, you have no idea!!

 

-Rick from Jersey

Share this post


Link to post
Share on other sites

Hi,

 

I have seen the video, downloaded and installed this brilliant looking add-on. I've followed the installations instructions to the letter, when it comes to running it however the scripting doesn't work.

 

Where in the video you click on an item and lightboxes appear with previews, attributes etc.. Mine doesn't. I've uploaded all the files in the download pack and nothings working. It appears that the stylesheet hasn't loaded either.

 

Thanks for the hlep in advance!

Share this post


Link to post
Share on other sites

Hi John, You are a genius! That add-on is way sweet! I want to use it on my OSC 2.3.3 but have a question. I have this store setup for a client that sells heated clothing and accessories and I pretty much done except one little glitch... And from what I have been reading, this issue is not a new one. I just don't know or can't figure out the best way of tackling it and I am hoping for your help! He sells a jacket and the sizes are XSmall, Small, Medium, Large, XLarge and 2XLarge. How can I setup the individual stock/quantity amounts for each one? For right now I can only set the stock/quantity amount for the jacket but need to break it out to setup amounts for each size. Some people have told me to use QTPro but it looks like overkill for what I want it for. I just want to manage how many sm, med, large, XLarge & 2XLarge sizes there are in stock for a product.

 

Your help is so appreciated, you have no idea!!

 

-Rick from Jersey

 

Dear Rick,

 

If you want to have individual stock/quantity amounts you must alter the core functionality of oscommerce. My addon cannot handle individual stock/quantity amounts because this functionality does not exist in oscommerce. So as i can imagine you must create a new table in db, (products_new_table_id, products_stock, products_quantity, products_size, products_id). Then you must make a page where you can setup this (this can be made on my addon) but the main fact is that you have to setup this in products_info page. When a user selects a size then (maybe with ajax) alter the prize and quantity. e.t.c.

 

Sorry for not answering sooner!

 

Regards John

Share this post


Link to post
Share on other sites

Hi,

 

I have seen the video, downloaded and installed this brilliant looking add-on. I've followed the installations instructions to the letter, when it comes to running it however the scripting doesn't work.

 

Where in the video you click on an item and lightboxes appear with previews, attributes etc.. Mine doesn't. I've uploaded all the files in the download pack and nothings working. It appears that the stylesheet hasn't loaded either.

 

Thanks for the hlep in advance!

 

Dear hoprick

 

I dont know whats the problem exactly. You can send me screenshots to check them, out. Please check also the console for errors.

 

Please contact me on my skype account, so we can solve the problems together. You can find my skype account on my profile!

 

Regards John

Share this post


Link to post
Share on other sites

@@gadlol

 

I have installed your newest version, I had your previous installed and had used it for quite some time and enjoyed it. After playing around with the newest version sofar I have found no problems with it so far.

 

I was wondering one thing however. Ive yet to look at the coding in this version but how easy would it be to modify this to accept more fields. I think the biggest example for most people is a 'Cost' field but I have several others as well and would love the ability to edit them in this.

 

Thanks!

Share this post


Link to post
Share on other sites

@@gadlol

 

I have installed your newest version, I had your previous installed and had used it for quite some time and enjoyed it. After playing around with the newest version sofar I have found no problems with it so far.

 

I was wondering one thing however. Ive yet to look at the coding in this version but how easy would it be to modify this to accept more fields. I think the biggest example for most people is a 'Cost' field but I have several others as well and would love the ability to edit them in this.

 

Thanks!

 

Hello Clint.

 

In order to modified it to accept more fields its easy. Although you must know php. You must also know how this field will be presented. It will be a select menu or simple text.

Lets see how we are going to do this: Open for editing the catalog/admin/tbl.php

 

1: enter the field name on the array $columns line 118. f.e. 'products_cost'

 

2: add inside the switch($john) on line 146:

case 'products_cost': $bool_products_cost=true; break;

 

3: add inside the switch($john) on line 167:

case 'products_cost': $bool_products_cost=false; break;

 

4: add on line 191:

$bool_products_cost=false;

 

5: add on line 210:

$_SESSION['products_cost']=$bool_products_cost

 

6: on line 230 add

$bool_products_cost=$_SESSION['products_cost']

 

7: add inside the $show_always array(line 281):

'products_cost'=>true;

 

8:on line 307 add

if($show_always[0]['products_cost']) $bool_products_cost=true;

 

9:on line 332 add:

case 'products_cost': $show_bool=$bool_products_cost; $show_text=TBL_HEADING_COST; break;

 

NOTE: TBL_HEADING_COST does not exist and you must add it on the tbl.php which is located on the includes/languages/english folder.

 

10: on 359 add:

$show_product[] = array('show'=>$bool_products_cost, 'fieldName'=>'products_cost', 'theadText'=>TBL_HEADING_COST);

 

Thats it.

 

If the cost is simple text then you must click on it and edit it via ajax it will ok. If it is a select menu you must goi and add a case a=on the big switch

switch($value['fieldName']){

 

Check the case'tax_class_title': case.

 

Finally you must edit the tbl_ajax.php and add a case f.e. :

 


case 'products_cost': //product cost
if(tep_not_null($product_id_post)){
if(tep_not_null($value_post)){
if(is_numeric($value_post)){
$sql_data_array = array('products_cost' => (float)tep_db_prepare_input($value_post),'products_last_modified' => 'now()');
if(tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$product_id_post . "'")) echo stripslashes($value_post);
}else echo TBL_ERROR_NONUMERIC_VALUE;
}else echo TBL_ERROR_EMPTY_VALUE;
}
break;

 

Hope this helps!

 

In next vesrion i will make it more simple (you will have just to enter the filed name and everything will be automatically set up)

 

Regards John

Share this post


Link to post
Share on other sites

@@gadlol

 

I finally found some time to look at your code today. Youve made a lot of changes since your last version!

 

I found one step missing from what you had above.:

On line 678 I needed to add in p.products_cost :)

 

Ive got 7 more fields to add to it before Im done and one of them is a select.

 

Thanks for your help!

Share this post


Link to post
Share on other sites

@@gadlol

 

I finally found some time to look at your code today. Youve made a lot of changes since your last version!

 

I found one step missing from what you had above.:

On line 678 I needed to add in p.products_cost :)

 

Ive got 7 more fields to add to it before Im done and one of them is a select.

 

Thanks for your help!

 

Hi EchoGuns, yes you are right. You must include the new field to the db query...

 

 

Well, i am not very satisfied with the code because right now i am using lots of variables for the different fields. So i am try to build it to be more flexible and less code.

I tried to keep it as dry as possible. I have to reconsider the use of variables, session variables e.t.c. Right now the tbl.php file is about 34.1 KB, i ll try to reduce it more. Maybe i will even remove the php comments - credits - changelog in the top of the tbl.php code

 

First thing i will remove is the jquery datatables, which has a pagination bug (when using it with jeditable), i cannot solve it, (when you are on second page and edit something it goes on first page and not in second).

So i will make a real pagination with php and not leave it to javascript because when a category has many products it takes lots of time to load all of them.

 

One second thing is that i will remove the onstock not on stock double key and use images instead because when you have many products it takes some time for jquery ui to create the nice loooking button elements...

 

I am also thinking of using a cache file system, simple cache though, file based. What do you think of it?

 

Update...

 

I forgot to mention that i will remove the lots of tables in favor of divs.

Edited by gadlol

Share this post


Link to post
Share on other sites

@@gadlol

 

Sounds good! I did notice a large amount of tables and while they have their uses I can see it easily being done with div tags.

 

Couple of things I would like to see, which wont be realistic for large shops, are the ability to list all products and also to display more than 100 items per page. Its probably just a personal preference but I like to be able to have it all at my fingertips and then be able to search by model number for instance. My situation is when we do price checks on competitors we can easily pull up the product by model number and then change the prices.

 

You've put a lot of work into this and it is indeed a time saver for me and a preferred method over using Easypopulate.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now