SimplaCMS script»,Modules SimplaCMS
Adding Youtube videos to the product
14-11-2022, 13:14
Everything is in the repository, write if you need tags in the admin panel and on the site. It is also implemented for each product its own tags in the catalog and on the product page. If you need a purchase price and its difference in the admin panel: in the catalog and on the product page, write, I will send instructions.
Here's how to make a purchase:
Code:
Purchase price for a product variant
kovalevsky - THANK YOU!!!!
I did it by analogy but for a more recent version
1. Add a new column in the database to the S_Variants table
(via phpmyadmin after price on price_opt float(14,2) )
2. Then edit /simpla/design/html/product.tpl
In the list <ul id="header">
after the line
<li class="variant_price">Price, {$currency->sign}</li>
insert
<li class="variant_price_opt">Wholesale price, {$currency->sign}</li>
In the <div id="variants"> tag
after the line
<li class="variant_price"> <input name="variants[price][]" type="text" value="{$variant->price|escape}" /></li>
insert
<li class="variant_price_opt"> <input name="variants[price_opt][]" type="text" value="{$variant->price_opt|escape}" /></li>
Next, in order to be displayed on the new options, we find
<ul id=new_variant style='display:none;'>
We insert by analogy
<li class="variant_price_opt"> <input name="variants[price_opt][]" type="text" value="{$variant->price_opt|escape}" /></li>
Let's add stylistics so that everything is displayed normally
Editing /simpla/design/css/style.css
Add
#variants_block li.variant_price_opt { width: 120px; }
#variants_block li.variant_price_opt input {
width: 95px;
font-size: 15px;
font-weight: bold;
color: #000;
}
3. /simpla/ProductAdmin.php
At the beginning of the main function inside
"if($this->request->method('post') &&!empty($_POST)) {"
adding:
$product->price_opt= $this->request->post('price_opt');
$price_opt= $this->request->get('price_opt');
4. api\variants.php
Find 2 (two) v.price after them add v.
price_opt v.brend_price
I didn't do it
api/Products.php adding
p.cena2 by analogy
Adding product.tpl and products.tpl to the template {$v->price_opt}
There are a few more options, like I did it for myself.
14-11-2022, 13:14
14-11-2022, 12:52
14-11-2022, 13:07
There are no comments
Information
Users of Visitor are not allowed to comment this publication.