virtocommerce An error occured while updating cart - virtocommerce

I have create a new store and add new physical item under category. when i click on item add to cart it shows me error?
How i can add item to cart..?

Thanks for updating your question. Seems that your product has no any images, so just add some primary image for your product and try to add it to shopping cart again. The presence of product primary image is necessary condition for now - as you can see an exception was occurred while converting your product to shopping cart line item at 22 line - product property PrimaryImage is null.

Related

In Opencart 3 under PHP 8 how do I call module to show in another page

I have seen on this site the post re calling a module on needed page. I have tried to use this code to solve a problem. This code does not appear to work for me.
What I have is a module that places a label over each product depending on its status. It works well on products throughout site. However I have a module which calls all products on to one page. I want the label to appear on the products on this all products page.
Banner on product
The code I used in catalog/controller for the all product extension from previous post here was (382 is the label module number):
$this->load->model('382');
$my_variable = $this->model_setting_module->getModule('382');
$data['any_variable'] = $my_variable['any_variable'];
On Template page:
{{ any_variable }}
How can I get the module to be apply the label to the custom all products page?
As always help appreciated
Create new module with name: "my_module" and you can call it in your "another_module" controller file:
$data['my_module'] = $this->load->controller('extension/module/my_module');
and in corresponding "another_module" template file you can retrieve it:
{{ my_module }}

Why description has <p><br></p> in description by default for some products in stock form odoo 15?

In Inventory, some products description shows the tag as given in image
by default. Why it shows and how it raised under which condition?
try this changes in your code
<p><br></p> replace with <p><br/></p>

How to obtain the record ID of the selected item in a dropdown list in google app-maker

Summary
Obtaining the record ID of the selected item in a drop-down list or radio-button UI appears to be a common question, but I have not found the answer for Google AppMaker despite months of searching.
The example use case: is I wish to edit a product that belongs to a family:
Product - (N:1) --> Family
Product - (M:N) --> FeatureValues
Example
The product belongs to the family Credit Card.
The credit-card family has the following features: |Contactles
|Near field
|Rates
|Chip & Pin|
In the edit form if I change the family the product belongs to then the list of features will change and new values for the features will need to be entered. (Dynamic form)
Hierarchy table
The family, features and permitted values are held in a single hierarchy table:
Family
|
Features
|
Values
newValue._key appears to only work for text-box UI items.
Dropdown list:
widget.datasource.item.Id or _key
provides the Product ID of the parent data source, ProductById (because I am editing a single product)
widget.datasource.selectKey(newValue._key); returns undefined
Sample code
Drop-down-list
OnValueChange event:
//update the features drop-down based on the taxonomy family selected
app.datasources.TaxonomyChildren.query.parameters.parent_fk = app.datasources.TaxonomyFamilies.item.Id;
app.datasources.TaxonomyChildren.load();
If I can pick up the record ID for the selected family in the dropdown list I can set a query.filter.parameter to show the features and values for the newly selected family.
Note: if it is a case you cannot create 'dynamic' forms in Google app-maker, then I'll stop as this has exhausted a lot of time.
Markus wrote:
So leave the options and value settings but in the onValueEdit run your query against TaxonomyChildren by passing in newValue.id to the query
Great Markus, that worked. On the drop-down ValueEdit event I call the function loadTaxonomyChildById(newValue.Id); passing it the Id of the selected TaxonomyFamily, changing the features displayed.

Display message in checkout if a product from categoy X or Y is in the basket

I'm going to edit the shipping.tpl file of my Prestashop theme and what I need to do is to show a text if product from categoy X or Y is already in the basket.
Any ideas on how to get this conditional statement working in Prestashop?
Use CartController or classes Cart to check if your product from a category is already in the cart.
CartController will use for display cart page so you can use the message controller error or warning, as you want
$this->warning[] = 'message';
$this->error[] = 'message error';
Cart classes will be used to check if the user try to add a product from category

List store has 2 items while list is showing 5 items

I am trying to implement an autocomplete field. The results are to be shown in a list. But everytime I make a search the new result is appended to the previous results. I tried clearing out the store attached to the list but it didn't work.
In debugger the store shows 2 items while the list shows many items (2 new + the items from previous search results)
Here is the fix:
list.refresh()
After removing the items from the attached store you need to refresh the list to tell it to load itself again.
try calling removeAll() on your store.
Eg.: Just to be sure check before removing
var isStoreLoaded =Ext.getStore("theStore").isLoaded( );
if(isStoreLoaded)
{
Ext.getStore("storeBomSearch").removeAll();
}
I hope this is a normal store, not a treeStore.