Jump to content

ragnabt

Members
  • Posts

    36
  • Joined

  • Last visited

Profile Information

  • Location
    Denmark
  • Activity
    User/Merchant

ragnabt's Achievements

Newbie

Newbie (1/14)

1

Reputation

1

Community Answers

  1. OMG! I figured it out myself... here is the code if someone is interested. file AdminStockManagementController.php location: override/controllers/admin remember to clear cache after uploading <?php class AdminStockManagementController extends AdminStockManagementControllerCore { public function __construct() { parent::__construct(); $this->fields_list['quantityonstock'] = array( 'title' => $this->l('Lager'), 'orderby' => false, 'filter' => false, 'search' => false, 'class' => 'fixed-width-sm', 'align' => 'center', 'hint' => $this->l('Disponibelt antal'), ); } public function renderList() { // sets actions $this->addRowAction('details'); $this->addRowAction('addstock'); $this->addRowAction('removestock'); if (count(Warehouse::getWarehouses()) > 1) $this->addRowAction('transferstock'); // no link on list rows $this->list_no_link = true; // inits toolbar $this->toolbar_btn = array(); // overrides query $this->_select = 'sta.quantity as quantityonstock, a.id_product as id, COUNT(pa.id_product_attribute) as variations'; $this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.id_product = a.id_product)'.Shop::addSqlAssociation('product_attribute', 'pa', false); $this->_join .=' LEFT JOIN `'._DB_PREFIX_.'stock_available` sta ON (sta.id_product = a.id_product)'; $this->_where = 'AND a.is_virtual = 0'; $this->_group = 'GROUP BY a.id_product'; // displays informations $this->displayInformation($this->l('This interface allows you to manage product stock and their variations.').'<br />'); $this->displayInformation($this->l('Through this interface, you can increase and decrease product stock for an given warehouse.')); $this->displayInformation($this->l('Furthermore, you can move product quantities between warehouses, or within one warehouse.').'<br />'); $this->displayInformation($this->l('If you want to increase quantities of multiple products at once, you can use the "Supply orders" page under the "Stock" menu.').'<br />'); $this->displayInformation($this->l('Finally, you need to provide the quantity that you\'ll be adding: "Usable for sale" means that this quantity will be available in your shop(s), otherwise it will be considered reserved (i.e. for other purposes).')); return AdminController::renderList(); } }
  2. Hi I really hope somebody can help. I´m trying to add the quantity field from the stock_available table to the stock management interface in the backend, so that it is possible to se both stock values. It´s should be as simple as the code below and i can writhe quantity in the fields_list, but then it shows the value from the product table. Then I add the sql but i cant seem to get the value from the stock table. Does anyone know how on earth i can do that? <?php class AdminStockManagementController extends AdminStockManagementControllerCore { public function __construct() { parent::__construct(); $this->_select .= 'crr.quantity as `stock_available`'; $this->_join .= ' LEFT JOIN `'._DB_PREFIX_.'stock_available` crr ON (crr.`id_product` = p.`id_product`)'; $this->fields_list['stock_available'] = array( 'title' => $this->l('test felt 2'), 'orderby' => false, 'filter' => false, 'search' => false, 'class' => 'fixed-width-sm', 'align' => 'center', 'hint' => $this->l('rbt tstd'), ); } }
  3. Hi I works great, but I dont understand how I can reorder the list, I would like to "remove" new client column and just put the carrier column in there instead.
  4. Hi I cant say if this is a bug in 1.6.0.9 but in my 1.6.0.11 i just had to import the quantity data into the stock_mvt table. The problem was that I only imported data into tables stock and stock_available but not into stock_mvt. (I was upgrading my shop from 1.4.7 to 1.6.0.11, and imported all of the products etc), and if there is no "start" data in the stock_mvt table then the advanced stock system thinks there is 0 on stock when removing from stock, and of course you cant remove something you dont have Hope that explains it, just try with one product and see if that works. insert into YOURPREFIX_stock_mvt (id_stock, id_order, id_supply_order, id_stock_mvt_reason, id_employee, employee_lastname, employee_firstname,physical_quantity, date_add, sign, price_te, referer) values (id_stock, 0, 0, 1, 1, 'employee lastname', 'employee firstname', quantity, now(),1,price,0)
  5. Har gjort nu, Den er heller ikke ret brugervenlig, det er nemmere i det engelske forum
  6. It has something to with stockmvt tables in the db, if there is no data there it cant be done. I importet my stock so I think its the cause :/
  7. Hej igen Så fandt jeg ud af hvad der drillede. Det viste sig at at Geolocations indstillingerne drillede i multistore. på hovedbutiksgruppen var den sat til at være deactive, samt på de 2 underliggende butikker men i databasen var butik 1 i butiksgruppe 1 (id´erne for min butik) så var ps_geolocation_enabled=1 så den blev sat til 0 og så kører det. det må også kunne forklare at det virkede når man har sin ip i vedligholdelse når butikken var deaktiv.
  8. Hi It seems the problem is solved. My presta is in multistore mode and in the configuration file there are 3 rows with ps_geolocation_enabled. one with null null in id_shop and id_shop_group and enabled =0 and one with 1 in id_shop_group and null in id_shop and enabled=0 and then there was enabled =1 for id_shop_group 1 and id_shop (which is my running shop) That must explain why it worked when the shop was deactivated. I hope someone can use this if the same problem occurs, and note to self: Test payment on testshop in active mode
  9. Hi I´m using prestashop 1.6.0.14, epay and onepagecheckout by zelarg Everything is fine and works as expected when my shop is in developing mode (deactive) but when I activate my shop, then an exception occurs in the paymentmodule this is in the log file *ERROR* 2015/09/13 - 11:42:09: The order address country is not active. at line 383 in file classes/PaymentModule.php The address are registred fine and the payment is fine, the order is in the backend. the only thing is that the order doesnt get a new status and therefore no orderconfirmation is sent to the customer. Please can anybody help?
  10. Hej ja har sendt epay en forespørgsel men det er weekend så jeg afventer spændt i morgen. jeg kan ikke se hvorfor den ikke vil acceptere det land, danmark, og at det virker i deaktiveret mode og ikke i aktive mode.
  11. Hej ja Lande er sat op som de skal både med hensyn til fragt moms osv. Alt andet kører som det skal. Som jeg skrev nedenfor så sker dette ikke når jeg deaktiverer shoppen og kører en ordre igennem. Det må have noget at gøre med at jeg tilføjer min ip for at kunne tilgå front office. ?? Det er her i koden det går galt - Paymentmodule.php if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery') $this->context->country = $context_country; if (!$this->context->country->active) --- HER MENER DEN AT LANDET IKKE ER ACTIVT. HVILKET LAND ER DET? { PrestaShopLogger::addLog('PaymentModule::validateOrder - Country is not active', 3, null, 'Cart', (int)$id_cart, true); throw new PrestaShopException('The order address country is not active.'); }
  12. har lige set i presta loggen at denne opstår så det må være et hint PaymentModule::validateOrder - Country is not active
  13. Hej jeg håber at nogen her kan hjælpe. jeg har aktiveret min shop i prestashop 1.6.0.14 og det er fint nok. Men efter jeg har aktiveret shoppen i presta så opfører ordre/epay sig anderledes dette sker: kunde bestiller, ordre oprettes i presta men får ikke status som Betaling accepteret, status er tom istedet for. Dermed får kunde ingen "betaling accepteret" mail og ikke nogen ordrebekræftelse mail. Ordrebekræftelsen dukker op på skærmen som den skal. Betalingen er oprettet i epay og kan hæves og ingen problemer. Hvis jeg deaktiverer shoppen og kører en ordre igennem, mens epay informationerne er drift informationerne (ikke test konto), så virker det fint og status ændres på ordren og mail udsendes. Please kan nogen hjælpe????
  14. Hi I haven´t read all of the answers in this thread so maybe someone has written this. I manage to import categories and products after a one night braintease with this, but regarding the categori import, then the parent category must come before the subcategory in the csv file, and the parent categories are referenced by name and not id Otherwise the subcategori can´t "know" which parent it has. Example of how the category import should look like. the following columns are id, active, name,parent category,root,description,meta title, meta keywords, meta description, seo friendly-url,path to img "1";"1";"Home";NULL;"0";"Description";"meta title";"meta keywords";"meta description";"friendly url";"http://pathtoimg/image.jpg" "5";"1";"Category 2";"Home";"0";"Description";"meta title";"meta keywords";"meta description";"friendly url";"http://pathtoimg/image.jpg" It´s a good idea to divide your import to smaller bits instead of importing one big file, especially when there are many rows. I divided my products to bits of 200 rows at a time. I exported/importet from ver 1.4.7 to 1.6.0.14 Don´t give up yet, it can be done
×
×
  • Create New...