News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

product filter in admin - discount

Started by marvays, March 04, 2020, 05:59:09 AM

Previous topic - Next topic

marvays

On the product list administration page, I see a filter that contains "Top Ten", "modified", "Discountinued" and a few others. Consider adding a filter to view products that have a discount.

Studio 42

Marvays, you can create a module for other cases.
I sold a products module with many other filters here https://shop.st42.fr/en/products/products-any-ways.htm

marvays

Nice work. But I have in mind the administration of products. Not a frontend.

pinochico

Hi Martine,
nice idea for custom programming - You can order a freelancer for this job.

We make such modifications for the client on demand as custom work ourselves - (delete customfields for discontinued child products, toggle for discontinued products, togle for featured products, info about imported products from feed/ERP, info about numbers of reviews for products) - see on the attachments.

Rudolf


www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Studio 42

Or create a vmextended plugin so you can add all filters you want.
Of course this can be included in core, but each shop need some other filters.
For a customer, he needed a order export per manufacturer by mail. I never requested it. Each shop work differently

Rsn

#5
Hi, for our tasks, I added new option to this product filter in backend - User (modified by).
Now I can filter products by editors.
It is very useful for us:



I think your task can be done by analogy.
This is a hack of 3 files VM.
I can share my decision.



Rsn

Quote from: marvays on March 04, 2020, 13:23:58 PM


If by "Discount" You meant "Overwrite final" in "Price" block, then this solution will work for You:

1) administrator/components/com_virtuemart/views/product/view.html.php

For $options array add last element ('discount' => 'Discount'):


$options = array( '' => vmText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'),
                  'parent' => vmText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_PARENT_PRODUCT'),
                  'product' => vmText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRODUCT'),
                  'price' => vmText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRICE'),
                  'withoutprice' => vmText::_('COM_VIRTUEMART_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_WITHOUTPRICE'),
                  'featured' => vmText::_('COM_VIRTUEMART_SHOW_FEATURED'),
                  'topten' => vmText::_('COM_VIRTUEMART_SHOW_TOPTEN'),
                  'latest' => vmText::_('COM_VIRTUEMART_LATEST_PRODUCT'),
                  'discontinued' => vmText::_('COM_VIRTUEMART_PRODUCT_FORM_DISCONTINUED'),
                  'discount' => 'Discount'
);


2) administrator/components/com_virtuemart/models/product.php

Find "switch ($group) {" and put, for example, second case:

case 'discount':
    $joinPrice = true;
    $where[] = 'pp.`override` = "1" AND pp.`product_override_price` < pp.`product_price` ';
    break;


This should work  ;)

Jörgen

Quote"Overwrite final"

This is legacy code and should NOT be used as it crashes with display of prices and VAT calculations etc.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Rsn

#9
Quote from: Jörgen on March 05, 2020, 21:39:27 PM
This is legacy code and should NOT be used

Jörgen, what code would you suggest as recommended?
:)


Quoteit crashes with display of prices and VAT calculations etc.

For product list filter in backend? Are you sure?

Jörgen

#10
Using calculation rules is the correct way to ensure that invoices, discounts, shipment and payment processors will work. Depending on the overrite final is not the way to go. You may come up with a solution using this, but it will not play well with other calculations. The discount option in prices is a legacy setting from VM 1.1 that You should not use. Creating discounts should be done with calculation rules.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Rsn

Quote from: marvays on March 04, 2020, 05:59:09 AM
Consider adding a filter to view products that have a discount.

marvays, how exactly do you assign discount to products?

Rsn

Jörgen, thanks, I understand you roughly.

Quote from: Jörgen on March 06, 2020, 08:52:44 AM
The discount option in prices is a legacy setting from VM 1.1 that You should not use.

Should not use?
We use it very actively. I would be very sad if it was removed from VirtueMart...

For example, our products are uploaded from the crm system. Approximately 300 products from different categories participate in the sale (closeout).
And for each product - its own sale price (purchase price).
I can easily automate this by setting Override price for this products. That's all right.

If I have to do this through the calculation rules, do I have to create a rule for each product? 300 rules?

I think Override price is a very necessary functionality that is relevant! Don't leave it, please.

Jörgen

Why should You use 300 discount rules ? I use 10 %, 20 % and so on, very flexible in my oppinion. I use on a very modest number of products, just around 2000, It has some drawbacks regarding children but otherwise ok.

The override is from the very VM start and is certainly going to be more and more obsolete and hard to combine with other options.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

Hi,

Ok,
I have products with final price
240
239
238
237
236
235
234
23X
..
200

I want her to adjust the price so that everyone has a price of 199 (psychologically for the buyer).

Do I really have to make a rule for every discount?

We use override price and import from ERP automatically. Maybe we are wrong?
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products