prak Posted March 19, 2017 Share Posted March 19, 2017 Hello, I have been able to delete product attribute groups this way: if($_GET['id']){ $id = $_GET['id']; $attribute_group = new AttributeGroup($id); $attribute_group->delete(); echo "deleted"; } I want to know how to delete a product attribute, I have tried this but this is not working: if ($_GET['id_ag']){ $id_ag = $_GET['id_ag']; $name = $_GET['name']; $attribute = new Attribute($id_ag,$name); $attribute -> delete(); echo "deleted"; } What is the right way to delete a product attribute programmatically? Help will be greatly appreciated!! Link to comment Share on other sites More sharing options...
NemoPS Posted March 19, 2017 Share Posted March 19, 2017 Once you have the id, you must construct this way__construct($id = null, $idLang = null, $idShop = null)So the second parameter must not be name, leave it empty and just use the id 1 Link to comment Share on other sites More sharing options...
prak Posted March 19, 2017 Author Share Posted March 19, 2017 oh I see, thank you very much nemoPs! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now