How do I add an attribute outside of combinations? - prestashop

I have such a case:
I created appropriate combinations of attributes, assigned prices to them. However, I need to add another attribute that will simply add a discount to calculated price. How to do this? I don't want to add other combinations because I would have to modify many newcombinations and prices manually. I would like to make it simply possible to choose one additional attribute which will give a percentage discount to the calculated price. Is it possible?

If I understand correctly, I think that you can use a catalog rule. Catalog rules are defined under:
Discount rules -> Catalog rules
Maybe they are named exactly differently because I donĀ“t use Prestashop in English and I am translating from another language. Once there you need to create a new rule using the plus ("+") sign at the top right. Once at the rule creation, use "Add a new group condition" at the bottom. There you may choose product characteristics to fire the rule. Remember to click on the "+" at the right to add the condition before saving.

Related

How to search after input value that must be between two feature values in prestashop?

To understand it fully I will give a clear example:
Our webshop sells zip ties. Every zip ties can be tightened between a minimum and a maximum diameter. For example say from 0.5" to 2".
In most of the cases the buyer needs a zip tie for a specific needed diameter. What we need is to have a possibility to get an input for the needed diameter and list all the zip ties where this input is between the minimum and maximum diameter.
I have tried different variations with layered navigation but it can not be done with it.
Any help is welcome.
You need to customize blocklayered module, some tips:
let's imagine in shop each product have 2 different features "min diameter" and "max diameter" and you already created filter for them, checkboxes.
hide these blocks by display:none
add in template input field for the actual diameter value.
after customer's input, select all min/max checkboxes that satisfy the condition
call blocklayered method to send the filters.

SQL Change from Decimal to Text

I am using OpenCart for a pizza restaurant and I need to add more than one price to the catalog page. I am looking now for someone to create all the mods I need for it but in the meantime I want to simply be able to add a line of text in lieu of adding a dollar amount for the price. In the database the settings under column>price are as follows:
Type: DECIMAL,
Length/Values: 15,2,
Default: as Defined, 0.00
When I try to add the following (which is what I would like until I can get the mods built): $7.95 / $10.95 it defaults to the decimal. I changed the settings to Text and tried some settings but I really don't know what I am doing. Can anyone tell me how I can make this happen? Perhaps if I could even add another field in the admin area and call that field in lieu of the text field? They will not offer online ordering for a couple weeks so I need a quick fix until the mods are done. Thanks.
From the comments i understood that you need two prices for a small and large pizza for example, if that is the case options are your solution, as they are used exactly for that to have the same product in different sizes and prices in your case, users just have to specify the option they need.
Also here is a tutorial that will guide you: http://www.opencarttutorial.com/how-to-setup-your-opencart-catalog/product-options/

SAP Business One I Query inventory base on user defined field

I am running a query on a product. I need a field that will look at the user defined field which contains another product and check that stock level. Any help would be great.
What is the main objective?
Are you trying to check on that item because that item is the material/component? or act like a substitution?
Using UDF is quite not feasible as you have to get the link to the Item Master Data, and I have not figured out yet how to do that.
But if you are using it as substitution, why don't you use Alternative Item in Inventory > Item Management > Alternative Items? It will show on Sales Quotation for you to display it to customer. Or during Sales Order, you can get it displayed for alternative should your main item is shortage.
If you are using those item as a component, I suggest you use Bill of Material. During Production Order you will be able to see those component's availability in qty, and also you can have more than one, unlike UDF.
Hope this helps.
I think the key part you're missing here is the naming convention which SAP adpots for user defined fields.
Correct me if I'm wrong, but it seems that you're capable of querying these fields from a SQL point of view.
UDFs by defuault, will have their column name prefixed with "U_".
For example, the UDF 'AnotherProduct' will be referred to in SQL as 'U_AnotherProduct'.
Hope this helps, if not, please explain your problem in some more detail.

OpenERP customers separation

Please I would like to know ho to separate customers in category, since we have two type of customers, the first group should only appear in crm->customers only and vice versa to avoid having a huge list of customers when searching.
My first attempt is to add a tag to different customers to separate them, for example the crm customers have the tag name Mass mailing is it correct to achieve this with tags ?? and my second question how to set default search keyword for example if I click on sales -> customers how to set the default value of search box to for example crmOnly tag thanks.
you can use "domain" where ever you want to have a such a separation.

Restrict Access of A Product based on few criterias

Goal:
Show all products to all users who have access rights to the purchase module.
However besides the above rule show only products who have value 'secfab' in the reference field to the users who created the same product.
Problem:
I tried using access records but my logic to build it is weak and I need help.
Case 1:
[('default_code','!=','secfab'),('created_id','=',user.id)]
If I code this then I only get one record and other records are not shown.
Case 2:
['|',('default_code','!=','secfab'),('created_id','=',user.id)]
If I code this then I only all the records and I am not able to achieve privacy that I wanted.
Any Help will be highly appreciated.
Your second case seems to be correct, except the clause for filtering on the creator looks misspelled. This typo could cause the rule to match all records, because the condition on the non-existing field created_id cannot be verified. Shouldn't it be:
['|', ('default_code', '!=', 'secfab'), ('create_uid', '=', user.id)]
which translates to "show all products that don't have secfab as code, plus all products, that the user created, regardless of their code", and seems to do what you want?
create_uid is one of the 4 fields automatically added by the system to all models that have _log_access set to True, which is the default. This is explained in the OpenERP technical memento and in the special fields documentation.