Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution]osC FireFox Conqueries


Recommended Posts

osC FireFox Conqueries

 

This contribution customizes your Firefox context-menu adding short-cuts for a number of frequent catalog maintenance tasks so that you can go straight into the admin for editing the items/page you are looking at from the catalog side.

 

This contribution makes use of the ConQuery Firefox extension in order to add a menu item to rightclick menu.

ConQuery allows you to take pieces from your current webpage and pass this as parameter to another website/webservice. So it has defined interfaces to query google, yahoo, ebay etc. There is an online repository with samples.

 

Known Issues

The handling of category paths is rudimentory. I hope someone better at regex can rationalize this code. (currently using similar cloned files for categories, subcategories and subSubCats ...)

 

This contribution relies on cPath and products_id variables in the url. If you use chemos SEO url's contribution, it just won't work.

 

Contents

Following searchplugin files are provided in this pack.

1) osCeditCat.cqr - Edit current top level category

2) osCeditManufacturer.cqr - Edit currently shown manufacturer

3) osCeditProduct.cqr - Edit current product

4) osCeditProductAttr.cqr - Edit product attributes (Using New Products Manager contribution)

5) osCeditSubCat.cqr - Edit current category (when category is a subcategory eg cPath=10_20)

6) osCeditSubSubCat.cqr - Edit current category (when category is a subsubcategory eg cPath=10_20_30)

7) osCsetFeaturedProduct.cqr - Set Featured flag for product (Using wolfen featured sets contribution)

8) osCunsetFeaturedProduct.cqr - Unset featured flag for product (Using wolfen featured sets contribution), this shows also how to fine tune a conquery to allow other options. (hold CTRL and click to get dialog screen)

9) osCspecialsCat.cqr - Maintain specials for current category (Using Admin Specials by Category contribution)

10) osCspecialsSubCat.cqr - Maintain specials for current subcategory (Using Admin Specials by Category contribution)

 

Enjoy ! and may this inspire others to make more conQueries :-"

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Contribution download available from: http://www.oscommerce.com/community/contributions,3227

 

For more info on ConQuery, please visit the ConQuery project page at http://conquery.mozdev.org/

Edited by bruyndoncx

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

This is really handy. Thank you.

 

I needed to modify the files slightly since I am using Chemo's ULTIMATE SEO contribution. If someone else needs these, here is the modification:

 

Change:

   showif="products_id=([0-9]+)"

 

To:

   showif="-p-([0-9]+)"

 

I also added this to all files:

 

<input name="mode" value="inplace">

 

This is to let admin side know that we are coming from catalog. For example on categories.php you could have redirect back to catalog side after editing category or product.

"Use no way as way, have no limitation as limitation." - Bruce Lee

Link to comment
Share on other sites

Thanks Matti.

 

Could you also post the code you used for the redirect ?

 

Carine

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Sure. Note this is propably not compatible with normal installations as I have my shop set up very differently from the stock directory/url scheme.

 

This is on categories.php when inserting an new product, but the principle is the same for other pages/actions too.

 

First getting an hidden form field if URL variable "&mode=inplace" is set:

 

<?php if ($_GET['mode'] == 'inplace') { ?>
<input type="hidden" name="mode" value="inplace" />
<?php } ?>

 

This needs to be repeated in the preview section

 

 if ($_POST['mode'] == 'inplace') {
 echo '<input type="hidden" name="mode" value="inplace" />';
}

 

Finally after everything is inserted to database, last in the case statement 'update_product':

 

Find

           tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));

 

Replace with:

 

if ($_POST['mode'] == 'inplace') {
          tep_redirect(HTTP_CATALOG_SERVER . 'product_info.php?products_id=' . $products_id);
} else {
          tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));
}

"Use no way as way, have no limitation as limitation." - Bruce Lee

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...