Post by ewilhelm » Sun Feb 05, 2012 5:12 pm

Doresc sa afisez stocul produselor in listingul acestora. Adica daca cineva se duce pe o categorie sa vada alaturi de pret si adauga in cos si stocul curent al produsului.
Ma poate ajuta cineva ?
Multumesc!

Newbie

Posts

Joined
Sun Feb 05, 2012 5:09 pm

Post by Lao » Sun Feb 05, 2012 5:20 pm

In Admin,

System/Settings/Edit settings pt magazinul respectiv/Options si pe pagina respectiva pe la mijloc ai optiunea Show Stock, cu 2 bife Yes or No. ;)

I'm using Open Cart 1.5.4.1 on http://www.importpieseauto.ro


User avatar
Lao
Active Member

Posts

Joined
Tue Nov 23, 2010 3:31 pm
Location - Craiova, Romania

Post by ewilhelm » Sun Feb 05, 2012 11:30 pm

Asta stiu, mersi.
Nu vreau sa-mi arate cantitatea din stoc. Vreau sa apara de exemplu in listingul "category" si stocul adica daca este in stoc sau nu.

Newbie

Posts

Joined
Sun Feb 05, 2012 5:09 pm

Post by Lao » Sun Feb 05, 2012 11:33 pm

Ah, acum am inteles, dar nu ma pricep la asta. Sorry.

I'm using Open Cart 1.5.4.1 on http://www.importpieseauto.ro


User avatar
Lao
Active Member

Posts

Joined
Tue Nov 23, 2010 3:31 pm
Location - Craiova, Romania

Post by nicudica » Mon Feb 06, 2012 4:51 pm

Saluty!

Este foarte simplu :)

Necesita putin cod insa.

edit:
catalog/controller/product/category

adaugi dupa linia: 190

Code: Select all

'quantity'    => $result['quantity'],
edit:
catalog/view/theme/nume_template/product/category.tpl

dupa linia: 87 adaugi

Code: Select all

<br>
<span class="price-tax">Sock <?php echo $product['quantity']; ?></span>
O mica captura:
http://postimage.org/image/tgb2chgud/

Aceslasi lucru il poti adauga si ptr. productatori ;)
Success

User avatar
Active Member

Posts

Joined
Wed Nov 11, 2009 9:20 pm
Location - Bucharest / Romania

Post by florinsith » Tue Feb 07, 2012 1:00 am

Sau, in catalog/controller/product/category.php

gaseste:

Code: Select all

if ($this->config->get('config_review_status')) {
					$rating = (int)$result['rating'];
				} else {
					$rating = false;
				}
dupa el adauga:

Code: Select all

if ($result['quantity'] <= 0) {
				$rstock = $result['stock_status'];
			} elseif ($this->config->get('config_stock_display')) {
				$rstock = "Stoc: " . $result['quantity'];
			} else {
				$rstock = "In stoc";
			}
Apoi dupa

Code: Select all

'thumb'       => $image,
adauga:

Code: Select all

'stoc'       => $rstock,
Apoi in catalog/view/theme/temata/template/product/category.tpl

dupa

Code: Select all

<div class="cart">
adauga

Code: Select all

<?php echo $product['stoc']; ?><br />
Asa va aparea ca pe pagina produsului.

demo: http://opencartwork.com/darren/index.ph ... ry&path=59

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by ewilhelm » Tue Feb 07, 2012 11:20 am

Multumesc frumos.
Se pare ca merge acum. Am folosit cea de-a doua varianta, insa am incercat-o si pe prima si merge.
Eu editam numai category.php si nu mergea , nu mi-am dat seama ca trebuie editat si category.tpl.

Mersi, inca o data!

Newbie

Posts

Joined
Sun Feb 05, 2012 5:09 pm
Who is online

Users browsing this forum: No registered users and 10 guests