SQL Change from Decimal to Text - sql

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/

Related

External mapping file to match string texts

I have a table of customer feedback (verbatim) that I would like to to 're-map' to the corrected Themes and Sub-Themes based on the keywords in the verbatim.
I would like to maintain an external mapping file that can be updated at any time with the updated mapping. As an example, my external file looks like this, using food data ;)
The keywords have logical OR/AND conditions, as well as wild card * for words like work* to map to working, worked, works etc.
I would like to map a table like above to my customer feedback table based on the Category column.
As an example, if the verbatim is in Category = Fruit, and contains the words (orange OR lemon), then I'd like to update the Themes column to Citrus.
If the theme is Citrus, and verbatim also contains the words (orange OR yellow) AND colour*, then the Sub-Theme would be Colour.
Can someone please advice what the best way to achieve this? And where would be the best place to put the logic for the themes and sub-themes such that there would be minimal changes required for future updates? (if not in this external file).
Would really appreciate your help and feedback!
Thank you in advance.

How do I add an attribute outside of combinations?

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.

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.

Prestashop: use BlockLayered class methods and/or DB tables for price range button?

I've got to build a standalone menu button with submenu that contains links to price ranges.
I activated the blocklayered module (not for this task, only for regular left-column filters). So the relative db tables are in place and populated.
I want to make a controller specific for price ranges. So I've got to do the right query and maybe set up the same url vars as the blocklayered module so they wil not conflict.
Would it be too crazy to import blocklayered or blocklayered-ajax in my controller and use part of their functionality? Maybe not good because of object duplication or other issues?
Or maybe, would it be a bad idea to use the blocklayered tables (for example layered_price_index) to help me get filtered products? I'm wandering if it would be a better solution than re-doing all by myself, or if instead it's not good for some reason.
Any idea?
It really depends on which amount (among the ones below) you would like to take into account in your price range filter:
Amount without taxes
Amount including taxes
Amount including discount/promotion
Amount in several currencies or only one currency
Amount for a specific customer group or for everyone
Amount base on any other product price rule
The easy way:
You can build a price range controller easily by yourself, handling only a single currency and prices without taxes and reduction. It will probably be 90% accurate (because of the missing discounts a product might not show up for a certain range).
In that case, you can easily build a query on the ps_product and ps_specific_price tables and SELECT in real-time the right products for a given range.
The proper way:
You want to handle discounts, price rules, specific prices, etc. If you build a real-time query including all these calculations and parameters, it may slow down the server.
Build a product price cache or re-use the one setup by the Block Layered module.

Big Commerce Prevent options showing which don't have SKU's

I am developing an interface from our stock system into a Big Commerce based website, but I have hit a snag, which I am hoping someone can help with
We set up option sets …. Eg trousers, jackets etc
We then set up options trousers_size, trousers_colour, Jackets_size, jackets_colour etc
Against each of our products we have the option set
So say we have 1 pair of trousers in sizes 30 and 32, colours Blue and black
We create 4 SKUS 30/blue, 32/blue, 30/black and 32/Black
Then say we have another pair of trousers sizes 34 and 36 colours Red and green
Again in the same way we create 4 SKU’s, which all works fine
Now for the Issue!
When you view both products on the front end they have all sizes and all colours showing on both products, not just the ones with the SKU’s attached (I have previously interfaced into Magento and that only shows the relevant sizes/colours to that product ie ony the ones which have simples associated with them)
Is there any way to do this on Big Commerce? -- I am hoping that there is a switch somewhere?
you need to set up rules.
go to the product,
beneath the option for the SKU you can create Rules.
Select the colours and sizes that aren't available and then scroll down to the next set where it will say make this product unavailable- hide from store view (something along those lines) i know the basics ive written are correct but its a total nightmare if you have a lot to do. i cannot understand why they made it so complicated when all really need ideally are columns to import from with the sizes ,38,40,42 in one column and colour in another.. but noooo this is far better they say.
I think the way to do it is through options. When you edit your options, you can specify which options should be displayed along with the product.
A better solution is to the change the store inventory setting to hide SKUs without stock.
To achieve this you:
From the left menu go to Advanced Settings › Inventory
Under 'General Settings', change 'When an option is out of stock' to Hide the option
(You can do the same thing for products as a whole. This is not displayed in the image below)
Inventory setting documentation at:
https://support.bigcommerce.com/articles/Public/Inventory-Settings