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

Update On virtueMart

Started by superpupervest, January 19, 2020, 13:21:24 PM

Previous topic - Next topic

superpupervest

Hello. There was a need to add the Old price to the site. I decided to do it as follows. Added an additional Input to the /administrator/components/com_virtuemart/views/product/tmpl/product_edit_price.php file, as well as an additional column in the biclp_virtuemart_product_prices table.

But I did not understand where and how to save the whole thing. Tell me please.

<tr class="row<?php echo $rowColor?>">
        <td width="120px">
            <div style="text-align: right; font-weight: bold;">
                                <span
                                        class="hasTip"
                                        title="Старая цена">
                                Старая цена
                                </span>
            </div>
            </td>
        <td width="140px"><input
                type="text"
                class="inputbox"
                name="mprices[old_price][]"
                size="12"
                style="text-align:right;"
                value="<?php echo $this->calculatedPrices['costPrice']; ?>"/>
          <? /*  <input type="hidden"
                   name="mprices[virtuemart_product_price_id][]"
                   value="<?php echo  $this->tempProduct->virtuemart_product_price_id?>"/> */?>
        </td>
        <td colspan="3">
       
        </td>
        <

pinochico

QuoteThere was a need to add the Old price to the site

The use only override price fo existing price on admin and setup view for price in admin and control your template.

You dont need programmable adding new input and change core Virtuemart . why? :)
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

Jörgen

What Do You mean with old price is this price before discount or an old costprice. If it is an old costprice, why only one ? Would it not great to implement historical costprices. Is This You want? This means a change to the core since only present price is supported.
Displaying one "old price" is easier and done in the same way as all overrides in Joomla under templates/your_template/html/com_virtuemart/...
Of course changes to the admin template views are also neccessary to make.

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

superpupervest

I need another replenishment field for an alternative price. And I want to understand how I can save and withdraw it.

pinochico

You can create new second price for every products and then override template for category or product for another view this price.

I use this option for view

price for sale
price for wholesale
price recommended

in one time on one place (detail product, category)
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

Jörgen

@pinochio

Do You create wholesale [wholseagroup] and recommended prices [rec group] and display the two extra prices this using these two user groups ?

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

pinochico

Yes, we use three groups:

- default
- wholesale
- recommended - without custommer, only for showing price

And in template we call all prices for show

- default == only default
- wholesale == wholesale and recommended price

with all functions (override price, max-min,...)

For this situation we use override template - call internall function createpricediv from VM for specific group.


Or we are wrong? :)

Look on the www.hanf-gesundheit.de
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

Jörgen

AFAIK it sounds like a great idea. Wish I had thought of it myself. Besides the extra template changes it uses VM standard price structure :)

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

superpupervest

The fact is that there is a wholesale price and retail and other types of prices. But I need that among them there should already be a separate field with the old price, which will have an exclusively informational character.

pinochico

But I use a separate price for a virtual customer group MOC that has REALLY BUT REALLY REALLY only the INFORMATION CHARACTER.
Why is it so hard to understand?
Please translate - price for MOC == OLD PRICE

In our country we say == Who does not believe, let there run == meant Let him find out himself == he doesn't need help from me.

And here on the forum - you do not have to run anywhere, just create duplicate posts (which in the meantime really happened :)


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

GJC Web Design

You can also use the override price and leave it disabled but displayed in the template

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pinochico

GJC:

It is a great option too, but I must change a little code in VM Email Manager, Easy Feeder, Connector for ERP for using disabled option override price now - all time we don't use it. :(

P.S.
Yes, I remember why we don't use this option - calculation VAT for override price is wrong and not function according to the Czech TAX law...
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

GJC Web Design

If the override price is left disabled then it is purely informational and not used in any calc or invoicing etc.
So effectively it is just a label

the "you save" I do at template level
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation