Backup
@ -100,8 +100,14 @@ RUN docker-php-ext-install -j$(nproc) ldap
|
|||||||
RUN pecl install imap \
|
RUN pecl install imap \
|
||||||
&& docker-php-ext-enable imap
|
&& docker-php-ext-enable imap
|
||||||
|
|
||||||
|
# rsvg und pdfmerge für creativelayouter
|
||||||
|
COPY ./src/new/assets/fonts /usr/local/share/fonts/custom
|
||||||
|
RUN fc-cache -fv
|
||||||
|
RUN apt-get update && apt-get install cairosvg -y
|
||||||
|
|
||||||
# COPY ./.docker/images/php/base/pdf/php_pdflib.so /pdflib.so
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
poppler-utils \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# make bash default shell
|
# make bash default shell
|
||||||
RUN sed -e 's;/bin/ash$;/bin/bash;g' -i /etc/passwd
|
RUN sed -e 's;/bin/ash$;/bin/bash;g' -i /etc/passwd
|
||||||
|
|||||||
@ -306,7 +306,7 @@ CREATE TABLE `article` (
|
|||||||
`a4_auflagen` text DEFAULT NULL,
|
`a4_auflagen` text DEFAULT NULL,
|
||||||
`a4_sponsoring` int(1) DEFAULT NULL,
|
`a4_sponsoring` int(1) DEFAULT NULL,
|
||||||
`a4_prodzeit` varchar(255) DEFAULT NULL,
|
`a4_prodzeit` varchar(255) DEFAULT NULL,
|
||||||
`a4_abpreis` float(8,2) DEFAULT 0.00,
|
`a4_abpreis` varchar(20) DEFAULT NULL,
|
||||||
`a5_buy` int(1) DEFAULT NULL,
|
`a5_buy` int(1) DEFAULT NULL,
|
||||||
`a5_xml` text DEFAULT NULL,
|
`a5_xml` text DEFAULT NULL,
|
||||||
`layouterid` varchar(255) DEFAULT NULL,
|
`layouterid` varchar(255) DEFAULT NULL,
|
||||||
|
|||||||
@ -1,27 +1,40 @@
|
|||||||
const Order_List_Detail = ({ uuid, basketField1, customerInfo, basketField2, pos, price, product, status, allNet, reOrder, reOrderOrder, reOrderPos }, orderUuid) => `
|
const Order_List_Detail = ({ uuid, basketField1, customerInfo, basketField2, pos, price, product, status, allNet, reOrder, reOrderOrder, reOrderPos }, orderUuid) => `
|
||||||
<div style="${psc.order.get_pos_bg_color(status)}" class="row ${psc.order.get_pos_bg_color_class(status)}" id="row-${uuid}">
|
<tr style="${psc.order.get_pos_bg_color(status)}" class="border-t border-stroke ${psc.order.get_pos_bg_color_class(status)}" id="row-${uuid}">
|
||||||
<div class="col-1 p-1">${pos}</div>
|
<td class="px-2 py-3"></td>
|
||||||
<div class="col-4 p-1">
|
<td class="px-2 py-3 font-medium">${pos}</td>
|
||||||
|
<td class="px-2 py-3" colspan="2"></td>
|
||||||
|
<td class="px-2 py-3" colspan="2"></td>
|
||||||
|
<td class="px-2 py-3"></td>
|
||||||
|
<td class="px-2 py-3">
|
||||||
${
|
${
|
||||||
(product => product.originalProduct ? `<a href="/apps/backend/product/edit/index/${product.originalProduct.uuid}">${product.originalProduct.title}</a>` : `<a href="/apps/backend/product/edit/index/${product.uuid}">${product.title}</a>` )(product) //call the anonymous inline with the data we care about
|
(product => product.originalProduct ? `<a href="/apps/backend/product/edit/index/${product.originalProduct.uuid}" class="text-psc-500 hover:underline">${product.originalProduct.title}</a>` : `<a href="/apps/backend/product/edit/index/${product.uuid}" class="text-psc-500 hover:underline">${product.title}</a>` )(product)
|
||||||
}
|
}
|
||||||
<br/>ArtNr intern: ${product.nrIntern}<br/>
|
<br/><span class="text-xs text-gray-600">ArtNr intern: ${product.nrIntern}</span><br/>
|
||||||
${psc.order.get_special_product_options(product.specialProductTypeObject)}</div>
|
${psc.order.get_special_product_options(product.specialProductTypeObject)}
|
||||||
<div class="col-1 p-1">Auflage: ${price.count}</div>
|
</td>
|
||||||
<div class="col-1 p-1">Kunden Info: ${customerInfo}${(reOrder? `<br/><strong>Ist eine Nachbestellung</strong>`:``)}</div>
|
<td class="px-2 py-3">
|
||||||
<div class="col-1 p-1">${basketField1}</div>
|
<span class="text-xs">Auflage: ${price.count}</span>
|
||||||
<div class="col-1 p-1">${basketField2}</div>
|
</td>
|
||||||
<div class="col-1 p-1 text-end">${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allNet/100)} <strong>(${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allGross/100)})</strong></div>
|
<td class="px-2 py-3">
|
||||||
<div class="col-2 p-2 text-end"><div class="btn-group btn-group-sm w-100">
|
<span class="text-xs">Kunden Info: ${customerInfo}${(reOrder? `<br/><strong class="text-yellow-600">Ist eine Nachbestellung</strong>`:``)}</span>
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
</td>
|
||||||
|
<td class="px-2 py-3 text-right whitespace-nowrap">
|
||||||
|
${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allNet/100)} <br/><strong>(${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allGross/100)})</strong>
|
||||||
|
</td>
|
||||||
|
<td class="px-2 py-3 text-right">
|
||||||
|
<div class="relative inline-block text-left">
|
||||||
|
<button type="button" class="inline-flex justify-between items-center w-full px-3 py-1.5 text-xs font-medium text-white bg-psc-500 hover:bg-psc-600 rounded-sm shadow-sm min-w-[120px]">
|
||||||
${psc.order.get_pos_status(status).internalName}
|
${psc.order.get_pos_status(status).internalName}
|
||||||
|
<svg class="w-4 h-4 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
||||||
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="hidden absolute right-0 z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
||||||
${psc.order.get_pos_status_loop(orderUuid, uuid)}
|
${psc.order.get_pos_status_loop(orderUuid, uuid)}
|
||||||
</div>
|
</div>
|
||||||
</div></div>
|
|
||||||
<div class="col-1 p-1"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Order_List_Detail_Simple = ({ uuid, basketField1, customerInfo, basketField2, pos, price, product, status, allNet }, orderUuid) => `
|
const Order_List_Detail_Simple = ({ uuid, basketField1, customerInfo, basketField2, pos, price, product, status, allNet }, orderUuid) => `
|
||||||
@ -45,7 +58,7 @@ const Order_List_Detail_Simple = ({ uuid, basketField1, customerInfo, basketFiel
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const Order_List_Pos_Status = (status, orderUuid, posUuid) => `
|
const Order_List_Pos_Status = (status, orderUuid, posUuid) => `
|
||||||
<button type="button" class="dropdown-item switch_pos" data-order-uuid="${orderUuid}" data-pos-uuid="${posUuid}" data-status="${status.code}">${status.internalName}</button>
|
<button type="button" class="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 switch_pos" data-order-uuid="${orderUuid}" data-pos-uuid="${posUuid}" data-status="${status.code}">${status.internalName}</button>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Order_List_Pos_Calc_Option = (elm) => `
|
const Order_List_Pos_Calc_Option = (elm) => `
|
||||||
@ -92,20 +105,26 @@ export class order {
|
|||||||
$('.toogle_list_detail_view').off();
|
$('.toogle_list_detail_view').off();
|
||||||
$('.toogle_list_detail_view').on('click', function() {
|
$('.toogle_list_detail_view').on('click', function() {
|
||||||
var uuid = $(this).data().uuid;
|
var uuid = $(this).data().uuid;
|
||||||
if($('#rows-' + uuid + ' > div').length > 0) {
|
var $icon = $(this);
|
||||||
|
if($('#rows-' + uuid).children().length > 0) {
|
||||||
$('#rows-' + uuid).html('');
|
$('#rows-' + uuid).html('');
|
||||||
|
$icon.removeClass('fa-minus').addClass('fa-plus');
|
||||||
}else{
|
}else{
|
||||||
psc.order.load_detail(uuid);
|
psc.order.load_detail(uuid);
|
||||||
|
$icon.removeClass('fa-plus').addClass('fa-minus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.toogle_list_simple_detail_view').off();
|
$('.toogle_list_simple_detail_view').off();
|
||||||
$('.toogle_list_simple_detail_view').on('click', function() {
|
$('.toogle_list_simple_detail_view').on('click', function() {
|
||||||
var uuid = $(this).data().uuid;
|
var uuid = $(this).data().uuid;
|
||||||
if($('#rows-' + uuid + ' > tr').length > 0) {
|
var $icon = $(this);
|
||||||
|
if($('#rows-' + uuid).children().length > 0) {
|
||||||
$('#rows-' + uuid).html('');
|
$('#rows-' + uuid).html('');
|
||||||
|
$icon.removeClass('fa-minus').addClass('fa-plus');
|
||||||
}else{
|
}else{
|
||||||
psc.order.load_detail(uuid, true);
|
psc.order.load_detail(uuid, true);
|
||||||
|
$icon.removeClass('fa-plus').addClass('fa-minus');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,15 @@ import { startStimulusApp } from '@symfony/stimulus-bundle';
|
|||||||
const app = startStimulusApp();
|
const app = startStimulusApp();
|
||||||
Alpine.plugin(persist)
|
Alpine.plugin(persist)
|
||||||
|
|
||||||
|
// Import PSC modules
|
||||||
|
import { order } from './js/order.js';
|
||||||
|
import { multiselect } from './js/multiselect.js';
|
||||||
|
|
||||||
|
// Initialize PSC global object
|
||||||
|
window.psc = window.psc || {};
|
||||||
|
window.psc.order = new order();
|
||||||
|
window.psc.multiselect = new multiselect();
|
||||||
|
|
||||||
Alpine.store('theme', {
|
Alpine.store('theme', {
|
||||||
theme: Alpine.$persist("light").as('theme'),
|
theme: Alpine.$persist("light").as('theme'),
|
||||||
|
|
||||||
@ -36,3 +45,7 @@ Alpine.store('sideBar', {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
Alpine.start();
|
Alpine.start();
|
||||||
|
|
||||||
|
// Initialize PSC modules
|
||||||
|
window.psc.order.init();
|
||||||
|
window.psc.multiselect.init();
|
||||||
|
|||||||
74
src/new/assets/tailwind/js/multiselect.js
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
export class multiselect {
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.bindMultiSelectButtons();
|
||||||
|
}
|
||||||
|
|
||||||
|
bindMultiSelectButtons() {
|
||||||
|
// Find all multiselect widgets
|
||||||
|
$('[data-multiselect-widget]').each(function() {
|
||||||
|
const $widget = $(this);
|
||||||
|
const $from = $widget.find('select[name$="_from"]');
|
||||||
|
const $to = $widget.find('select[name]:not([name$="_from"])');
|
||||||
|
|
||||||
|
// Get base ID (without _from or _to suffix)
|
||||||
|
const fromId = $from.attr('id');
|
||||||
|
|
||||||
|
// Right All button
|
||||||
|
$widget.find('button[id$="_rightAll"]').off('click').on('click', function() {
|
||||||
|
$from.find('option').each(function() {
|
||||||
|
const $option = $(this).clone();
|
||||||
|
$to.append($option);
|
||||||
|
});
|
||||||
|
$from.empty();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Right Selected button
|
||||||
|
$widget.find('button[id$="_rightSelected"]').off('click').on('click', function() {
|
||||||
|
$from.find('option:selected').each(function() {
|
||||||
|
const $option = $(this).clone();
|
||||||
|
$to.append($option);
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Left Selected button
|
||||||
|
$widget.find('button[id$="_leftSelected"]').off('click').on('click', function() {
|
||||||
|
$to.find('option:selected').each(function() {
|
||||||
|
const $option = $(this).clone();
|
||||||
|
$from.append($option);
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Left All button
|
||||||
|
$widget.find('button[id$="_leftAll"]').off('click').on('click', function() {
|
||||||
|
$to.find('option').each(function() {
|
||||||
|
const $option = $(this).clone();
|
||||||
|
$from.append($option);
|
||||||
|
});
|
||||||
|
$to.empty();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Double click to move items
|
||||||
|
$from.off('dblclick').on('dblclick', 'option', function() {
|
||||||
|
const $option = $(this).clone();
|
||||||
|
$to.append($option);
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
$to.off('dblclick').on('dblclick', 'option', function() {
|
||||||
|
const $option = $(this).clone();
|
||||||
|
$from.append($option);
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Before form submit, select all options in the "to" select
|
||||||
|
$('form').on('submit', function() {
|
||||||
|
$(this).find('[data-multiselect-widget]').each(function() {
|
||||||
|
$(this).find('select[name]:not([name$="_from"]) option').prop('selected', true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
309
src/new/assets/tailwind/js/order.js
Normal file
@ -0,0 +1,309 @@
|
|||||||
|
const Order_List_Detail = ({ uuid, basketField1, customerInfo, basketField2, pos, price, product, status, allNet, reOrder, reOrderOrder, reOrderPos }, orderUuid) => `
|
||||||
|
<td colspan="12" class="px-6 py-4 bg-gray-50" style="${psc.order.get_pos_bg_color(status)}">
|
||||||
|
<div class="grid grid-cols-12 gap-4 w-full" id="row-${uuid}">
|
||||||
|
<div class="col-span-1">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Pos:</span>
|
||||||
|
<div class="font-medium">${pos}</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-4">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Produkt:</span>
|
||||||
|
<div>
|
||||||
|
${
|
||||||
|
(product => product.originalProduct ? `<a href="/apps/backend/product/edit/index/${product.originalProduct.uuid}" class="text-psc-500 hover:underline">${product.originalProduct.title}</a>` : `<a href="/apps/backend/product/edit/index/${product.uuid}" class="text-psc-500 hover:underline">${product.title}</a>` )(product)
|
||||||
|
}
|
||||||
|
<br/><span class="text-xs text-gray-600">ArtNr intern: ${product.nrIntern}</span><br/>
|
||||||
|
${psc.order.get_special_product_options(product.specialProductTypeObject)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-2">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Auflage:</span>
|
||||||
|
<div>${price.count}</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-2">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Kunden Info:</span>
|
||||||
|
<div class="text-sm">${customerInfo}${(reOrder? `<br/><strong class="text-yellow-600">Ist eine Nachbestellung</strong>`:``)}</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-2">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Preis:</span>
|
||||||
|
<div class="text-right whitespace-nowrap">
|
||||||
|
${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allNet/100)}<br/>
|
||||||
|
<strong>(${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allGross/100)})</strong>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-1">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Status:</span>
|
||||||
|
<div class="relative inline-block text-left w-full">
|
||||||
|
<button type="button" class="inline-flex justify-between items-center w-full px-3 py-1.5 text-xs font-medium text-white bg-psc-500 hover:bg-psc-600 rounded-sm shadow-sm">
|
||||||
|
${psc.order.get_pos_status(status).internalName}
|
||||||
|
<svg class="w-4 h-4 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<div class="hidden absolute right-0 z-10 mt-1 w-56 rounded-sm shadow-xl bg-white border border-gray-200 py-1">
|
||||||
|
${psc.order.get_pos_status_loop(orderUuid, uuid)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Order_List_Detail_Simple = ({ uuid, basketField1, customerInfo, basketField2, pos, price, product, status, allNet }, orderUuid) => `
|
||||||
|
<td colspan="12" class="px-6 py-4 bg-gray-50" style="${psc.order.get_pos_bg_color(status)}">
|
||||||
|
<div class="flex gap-4 w-full">
|
||||||
|
<div class="flex-none w-16">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Pos:</span>
|
||||||
|
<div class="font-medium">${pos}</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Produkt:</span>
|
||||||
|
<div>
|
||||||
|
${
|
||||||
|
(product => product.originalProduct ? `<a href="/apps/backend/product/edit/index/${product.originalProduct.uuid}" class="text-psc-500 hover:underline">${product.originalProduct.title}</a>` : `<a href="/apps/backend/product/edit/index/${product.uuid}" class="text-psc-500 hover:underline">${product.title}</a>` )(product)
|
||||||
|
}
|
||||||
|
<br/><span class="text-xs text-gray-600">ArtNr intern: ${product.nrIntern}</span><br/>
|
||||||
|
${psc.order.get_special_product_options(product.specialProductTypeObject)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-none w-32">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Auflage:</span>
|
||||||
|
<div>${price.count}</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-none w-48">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Kunden Info:</span>
|
||||||
|
<div class="text-sm">${customerInfo}</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-none w-32 text-right">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Preis:</span>
|
||||||
|
<div class="whitespace-nowrap">${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allNet/100)} <strong>(${new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(price.allGross/100)})</strong></div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-none w-24">
|
||||||
|
<span class="text-xs font-semibold text-gray-700">Status:</span>
|
||||||
|
<div>${psc.order.get_pos_status(status).internalName}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Order_List_Pos_Status = (status, orderUuid, posUuid) => `
|
||||||
|
<button type="button" class="flex items-center w-full px-3 py-1.5 text-xs text-gray-700 hover:bg-psc-50 hover:text-psc-700 transition-colors switch_pos" data-order-uuid="${orderUuid}" data-pos-uuid="${posUuid}" data-status="${status.code}">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-3.5 h-3.5 mr-2 text-gray-400">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
|
</svg>
|
||||||
|
${status.internalName}
|
||||||
|
</button>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Order_List_Pos_Calc_Option = (elm) => `
|
||||||
|
<tr><td>${elm.name}</td><td>${elm.value}</td></tr>
|
||||||
|
`;
|
||||||
|
|
||||||
|
export class order {
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.load_status();
|
||||||
|
this.bind_buttons();
|
||||||
|
this.init_dropdowns();
|
||||||
|
}
|
||||||
|
|
||||||
|
init_dropdowns() {
|
||||||
|
// Initialize all status dropdowns (both in main table and details)
|
||||||
|
$(document).off('click.orderDropdown');
|
||||||
|
$(document).on('click.orderDropdown', '.relative.inline-block button', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
var $dropdown = $(this).next('div');
|
||||||
|
|
||||||
|
// Close all other dropdowns
|
||||||
|
$('.relative.inline-block div[class*="hidden"]').addClass('hidden');
|
||||||
|
|
||||||
|
// Toggle this dropdown
|
||||||
|
$dropdown.toggleClass('hidden');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Close dropdowns when clicking outside
|
||||||
|
$(document).on('click.orderDropdown', function(e) {
|
||||||
|
if (!$(e.target).closest('.relative.inline-block').length) {
|
||||||
|
$('.relative.inline-block div[class*="absolute"]').addClass('hidden');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
get_special_product_options(specialProductTypeObject) {
|
||||||
|
if(specialProductTypeObject.typ != 6) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '<table>' + specialProductTypeObject.options.map(elm => {
|
||||||
|
if(elm.type != 'hidden') {
|
||||||
|
return Order_List_Pos_Calc_Option(elm);
|
||||||
|
}
|
||||||
|
}).join('') + '</table>';
|
||||||
|
}
|
||||||
|
|
||||||
|
load_status() {
|
||||||
|
if(jwt_token != "") {
|
||||||
|
$.ajax({
|
||||||
|
url: "/apps/api/system/status",
|
||||||
|
contentType: "application/json",
|
||||||
|
headers: {
|
||||||
|
"Authorization": "Bearer " + jwt_token
|
||||||
|
},
|
||||||
|
method: 'GET',
|
||||||
|
success: function (result) {
|
||||||
|
psc.order.status_order = result.order;
|
||||||
|
psc.order.status_pos = result.position;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bind_buttons() {
|
||||||
|
$('.toogle_list_detail_view').off();
|
||||||
|
$('.toogle_list_detail_view').on('click', function() {
|
||||||
|
var uuid = $(this).data().uuid;
|
||||||
|
var $icon = $(this);
|
||||||
|
if($('#rows-' + uuid).children().length > 0) {
|
||||||
|
$('#rows-' + uuid).html('');
|
||||||
|
$icon.removeClass('fa-minus').addClass('fa-plus');
|
||||||
|
}else{
|
||||||
|
psc.order.load_detail(uuid);
|
||||||
|
$icon.removeClass('fa-plus').addClass('fa-minus');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.toogle_list_simple_detail_view').off();
|
||||||
|
$('.toogle_list_simple_detail_view').on('click', function() {
|
||||||
|
var uuid = $(this).data().uuid;
|
||||||
|
var $icon = $(this);
|
||||||
|
if($('#rows-' + uuid).children().length > 0) {
|
||||||
|
$('#rows-' + uuid).html('');
|
||||||
|
$icon.removeClass('fa-minus').addClass('fa-plus');
|
||||||
|
}else{
|
||||||
|
psc.order.load_detail(uuid, true);
|
||||||
|
$icon.removeClass('fa-plus').addClass('fa-minus');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
load_detail(orderUuid, simple = false) {
|
||||||
|
$.ajax({
|
||||||
|
url: "/apps/api/order/getonebyuuid",
|
||||||
|
contentType: "application/json",
|
||||||
|
headers: {
|
||||||
|
"Authorization": "Bearer " + jwt_token
|
||||||
|
},
|
||||||
|
method: 'POST',
|
||||||
|
data: JSON.stringify({
|
||||||
|
uuid: orderUuid
|
||||||
|
}),
|
||||||
|
success: function(result) {
|
||||||
|
psc.order.build_details(orderUuid, result, simple);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
build_details(orderUuid, result, simple = false) {
|
||||||
|
if(simple) {
|
||||||
|
$('#rows-' + result.uuid).html(result.positions.map(x => Order_List_Detail_Simple(x, orderUuid)).join(''));
|
||||||
|
}else{
|
||||||
|
$('#rows-' + result.uuid).html(result.positions.map(x => Order_List_Detail(x, orderUuid)).join(''));
|
||||||
|
result.positions.map(x => this.loadPluginDetails(x));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.bind_status_buttons();
|
||||||
|
}
|
||||||
|
|
||||||
|
loadPluginDetails(pos) {
|
||||||
|
$.ajax({
|
||||||
|
url: "/apps/api/position/getpluginlistdetails/" + pos.uuid,
|
||||||
|
contentType: "application/json",
|
||||||
|
headers: {
|
||||||
|
"Authorization": "Bearer " + jwt_token
|
||||||
|
},
|
||||||
|
method: 'GET',
|
||||||
|
success: function(result) {
|
||||||
|
$('#row-' + pos.uuid).append(result.html);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
bind_status_buttons() {
|
||||||
|
// Bind status change buttons for positions
|
||||||
|
$('.switch_pos').off();
|
||||||
|
$('.switch_pos').on('click', function() {
|
||||||
|
|
||||||
|
var orderUuid = $(this).data().orderUuid;
|
||||||
|
var posUuid = $(this).data().posUuid;
|
||||||
|
var status = $(this).data().status;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: "/apps/api/position/status/change",
|
||||||
|
contentType: "application/json",
|
||||||
|
headers: {
|
||||||
|
"Authorization": "Bearer " + jwt_token
|
||||||
|
},
|
||||||
|
data: JSON.stringify({
|
||||||
|
position: posUuid,
|
||||||
|
status: status,
|
||||||
|
}),
|
||||||
|
method: 'POST',
|
||||||
|
success: function(result) {
|
||||||
|
$('#rows-' + orderUuid).html('');
|
||||||
|
psc.order.load_detail(orderUuid);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
get_pos_bg_color(status) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
{% if orderStatuse.getPosStatusColor(pos.status) != '' %}background-color: {{ orderStatuse.getPosStatusColor(pos.status) }}{% endif %}"
|
||||||
|
*/
|
||||||
|
const found = psc.order.status_pos.find(stat => stat.code == status);
|
||||||
|
|
||||||
|
if(found && found.color != "") {
|
||||||
|
return 'background-color: ' + found.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
get_pos_status(status) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
{% if orderStatuse.getPosStatusColor(pos.status) != '' %}background-color: {{ orderStatuse.getPosStatusColor(pos.status) }}{% endif %}"
|
||||||
|
*/
|
||||||
|
const found = psc.order.status_pos.find(stat => stat.code == status);
|
||||||
|
if(found) {
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {internalName: 'notFound'};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
get_pos_bg_color_class(status) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
class="{% if pos.status == 170 %}bg-lightdark{% elseif pos.status == 200 or pos.status == 210 %}bg-lightsuccess{% else %}bg-lightdanger{% endif %}
|
||||||
|
*/
|
||||||
|
|
||||||
|
if(status == 170) {
|
||||||
|
return 'bg-lightdark';
|
||||||
|
}
|
||||||
|
if(status == 200 || status == 210) {
|
||||||
|
return 'bg-lightsuccess';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'bg-lightdanger';
|
||||||
|
}
|
||||||
|
|
||||||
|
get_pos_status_loop(orderUuid, posUuid) {
|
||||||
|
return psc.order.status_pos.map(x => Order_List_Pos_Status(x, orderUuid, posUuid)).join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -54,6 +54,7 @@
|
|||||||
"oyejorge/less.php": "~1.5",
|
"oyejorge/less.php": "~1.5",
|
||||||
"paypal/paypal-checkout-sdk": "dev-master",
|
"paypal/paypal-checkout-sdk": "dev-master",
|
||||||
"paypal/rest-api-sdk-php": "dev-master",
|
"paypal/rest-api-sdk-php": "dev-master",
|
||||||
|
"phenx/php-font-lib": "^1.0",
|
||||||
"phpoffice/phpspreadsheet": "^1.28",
|
"phpoffice/phpspreadsheet": "^1.28",
|
||||||
"phpseclib/phpseclib": "~3.0",
|
"phpseclib/phpseclib": "~3.0",
|
||||||
"picqer/sendcloud-php-client": "v2.8.1",
|
"picqer/sendcloud-php-client": "v2.8.1",
|
||||||
|
|||||||
47
src/new/composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "f0609413226c0c4e60f20fbe8a606b6b",
|
"content-hash": "a64df55d7d2fc51cd3b31487e06b46da",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "azuyalabs/yasumi",
|
"name": "azuyalabs/yasumi",
|
||||||
@ -6470,6 +6470,51 @@
|
|||||||
"abandoned": "paypal/paypal-server-sdk",
|
"abandoned": "paypal/paypal-server-sdk",
|
||||||
"time": "2020-05-11T17:21:19+00:00"
|
"time": "2020-05-11T17:21:19+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "phenx/php-font-lib",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/dompdf/php-font-lib.git",
|
||||||
|
"reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d",
|
||||||
|
"reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"php": "^7.1 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/phpunit-bridge": "^3 || ^4 || ^5 || ^6"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"FontLib\\": "src/FontLib"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"LGPL-2.1-or-later"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "The FontLib Community",
|
||||||
|
"homepage": "https://github.com/dompdf/php-font-lib/blob/master/AUTHORS.md"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A library to read, parse, export and make subsets of different types of font files.",
|
||||||
|
"homepage": "https://github.com/dompdf/php-font-lib",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/dompdf/php-font-lib/issues",
|
||||||
|
"source": "https://github.com/dompdf/php-font-lib/tree/1.0.1"
|
||||||
|
},
|
||||||
|
"time": "2024-12-02T14:37:59+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-common",
|
"name": "phpdocumentor/reflection-common",
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
|
|||||||
@ -2,8 +2,6 @@ services:
|
|||||||
_defaults:
|
_defaults:
|
||||||
autowire: true
|
autowire: true
|
||||||
autoconfigure: true
|
autoconfigure: true
|
||||||
bind:
|
|
||||||
$pdflib_lic: 'L900202-010091-135115-PPD3D2-EHE432'
|
|
||||||
|
|
||||||
PSC\Component\SteplayouterBundle\:
|
PSC\Component\SteplayouterBundle\:
|
||||||
resource: '../../*/*'
|
resource: '../../*/*'
|
||||||
@ -15,27 +13,3 @@ services:
|
|||||||
PSC\Component\SteplayouterBundle\Queue\Render:
|
PSC\Component\SteplayouterBundle\Queue\Render:
|
||||||
tags:
|
tags:
|
||||||
- { name: queues }
|
- { name: queues }
|
||||||
|
|
||||||
# tp.component.steplayouter.upload_listener:
|
|
||||||
# class: PSC\Component\SteplayouterBundle\EventListener\PostUploadListener
|
|
||||||
# tags:
|
|
||||||
# - { name: kernel.event_listener, event: oneup_uploader.post_upload, method: postUpload }
|
|
||||||
# arguments: ['@doctrine']
|
|
||||||
#
|
|
||||||
# psc.component.steplayouter.calendargenerator:
|
|
||||||
# class: PSC\Component\SteplayouterBundle\Calendar\Generator
|
|
||||||
# arguments: ['@service_container']
|
|
||||||
#
|
|
||||||
# psc.component.steplayouter.configure_menu_listener:
|
|
||||||
# class: PSC\Component\SteplayouterBundle\EventListener\ConfigureMenuListener
|
|
||||||
# tags:
|
|
||||||
# - { name: kernel.event_listener, event: psc.backend.system, method: onMenuConfigureSystem }
|
|
||||||
#
|
|
||||||
# psc.component.steplayouter.pdf:
|
|
||||||
# class: PSC\Component\SteplayouterBundle\Service\Pdf
|
|
||||||
# arguments: ['@doctrine.orm.entity_manager', '%pdflib_lic%', '@kernel', '@psc.component.steplayouter.converter.toArray', '@doctrine_mongodb', '@service_container']
|
|
||||||
#
|
|
||||||
# psc.component.steplayouter.converter.toArray:
|
|
||||||
# class: PSC\Component\SteplayouterBundle\Config\Converter\ToArray
|
|
||||||
# arguments: ['@PSC\\System\\SettingsBundle\\Service\\Color', '@security.authorization_checker', '@security.token_storage', '@doctrine_mongodb']
|
|
||||||
#
|
|
||||||
|
|||||||
@ -24,28 +24,31 @@ use Twig\Environment;
|
|||||||
class Pdf
|
class Pdf
|
||||||
{
|
{
|
||||||
protected $entityManager;
|
protected $entityManager;
|
||||||
protected $pdf_lic;
|
|
||||||
protected $kernel;
|
protected $kernel;
|
||||||
protected $mongoDb;
|
protected $mongoDb;
|
||||||
protected $converter;
|
protected $converter;
|
||||||
protected $twig;
|
protected $twig;
|
||||||
|
|
||||||
public function __construct(EntityManagerInterface $em, $pdflib_lic, KernelInterface $kernel, ToArray $converter, DocumentManager $mongoDb, Environment $twig)
|
public function __construct(
|
||||||
{
|
EntityManagerInterface $em,
|
||||||
|
KernelInterface $kernel,
|
||||||
|
ToArray $converter,
|
||||||
|
DocumentManager $mongoDb,
|
||||||
|
Environment $twig,
|
||||||
|
) {
|
||||||
$this->entityManager = $em;
|
$this->entityManager = $em;
|
||||||
$this->pdf_lic = $pdflib_lic;
|
|
||||||
$this->kernel = $kernel;
|
$this->kernel = $kernel;
|
||||||
$this->converter = $converter;
|
$this->converter = $converter;
|
||||||
$this->mongoDb = $mongoDb;
|
$this->mongoDb = $mongoDb;
|
||||||
$this->twig = $twig;
|
$this->twig = $twig;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create($outfilename, $layouter_uuid, $alias = "")
|
public function create($outfilename, $layouter_uuid, $alias = '')
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @var Layoutdesigndata $layoutData */
|
/** @var Layoutdesigndata $layoutData */
|
||||||
$layoutData = $this->entityManager
|
$layoutData = $this->entityManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')->findOneBy(array('uuid' => $layouter_uuid));
|
->getRepository('PSC\Shop\EntityBundle\Entity\Layoutdesigndata')
|
||||||
|
->findOneBy(['uuid' => $layouter_uuid]);
|
||||||
|
|
||||||
if (!$layoutData) {
|
if (!$layoutData) {
|
||||||
return;
|
return;
|
||||||
@ -58,32 +61,16 @@ class Pdf
|
|||||||
$dynamicSizeHeight = $layoutData->getDynamicHeight();
|
$dynamicSizeHeight = $layoutData->getDynamicHeight();
|
||||||
|
|
||||||
if (empty($datatable)) {
|
if (empty($datatable)) {
|
||||||
$datatable[] = array();
|
$datatable[] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$product = $this->entityManager
|
$product = $this->entityManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Product')->findOneBy(array('uuid' => $layoutData->getArticleUuid()));
|
->getRepository('PSC\Shop\EntityBundle\Entity\Product')
|
||||||
|
->findOneBy(['uuid' => $layoutData->getArticleUuid()]);
|
||||||
$p = new \PDFlib();
|
|
||||||
$p->set_option("errorpolicy=return");
|
|
||||||
$p->set_option("stringformat=utf8");
|
|
||||||
if ($this->pdf_lic && $this->pdf_lic != "") {
|
|
||||||
@$p->set_parameter("license", $this->pdf_lic);
|
|
||||||
}
|
|
||||||
$p->set_option("SearchPath=" . $this->kernel->getProjectDir() . "/assets/fonts");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($p->begin_document($outfilename, "") == 0) {
|
|
||||||
die("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
$p->set_info("Creator", "PDFlib starter sample");
|
|
||||||
$p->set_info("Title", "starter_path");
|
|
||||||
|
|
||||||
$dataArray = $this->converter->fromXml($product);
|
$dataArray = $this->converter->fromXml($product);
|
||||||
|
|
||||||
$tempFiles = array();
|
$tempFiles = [];
|
||||||
|
|
||||||
foreach ($datatable as $row) {
|
foreach ($datatable as $row) {
|
||||||
$pageOpen = false;
|
$pageOpen = false;
|
||||||
@ -94,306 +81,75 @@ class Pdf
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$svgContent = $this->utf8_for_xml($site['fabricSVG']);
|
$svg = $this->utf8_for_xml($site['fabricSVG']);
|
||||||
|
|
||||||
if ($dynamicSize) {
|
if ($dynamicSize) {
|
||||||
$site['width'] = $dynamicSizeWidth;
|
$site['width'] = $dynamicSizeWidth;
|
||||||
$site['height'] = $dynamicSizeHeight;
|
$site['height'] = $dynamicSizeHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
$xml = simplexml_load_string($svgContent);
|
preg_match_all('/(image|xlink:href)=(")[^">]+/i', $svg, $media);
|
||||||
$tps = $xml->xpath('//*[string(@templatePrintBinding)]');
|
$urls = preg_replace('/(image|xlink:href)("|=")(.*)/i', '$3', $media[0]);
|
||||||
|
|
||||||
foreach ($tps as $tp) {
|
|
||||||
$tp->{0} = $tp['templatePrintBinding'];
|
|
||||||
}
|
|
||||||
$svgContent = $xml->asXML();
|
|
||||||
preg_match_all('/(image|xlink:href)=(")[^">]+/i', $svgContent, $media);
|
|
||||||
$urls = preg_replace('/(image|xlink:href)("|=")(.*)/i', "$3", $media[0]);
|
|
||||||
$cal = false;
|
$cal = false;
|
||||||
foreach ($urls as $url) {
|
foreach ($urls as $url) {
|
||||||
$matches = array();
|
$matches = [];
|
||||||
|
|
||||||
$found = preg_match("/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/", $url, $matches);
|
$found = preg_match(
|
||||||
|
'/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/',
|
||||||
|
$url,
|
||||||
|
$matches,
|
||||||
|
);
|
||||||
|
|
||||||
if ($found == 0) {
|
if ($found == 0) {
|
||||||
$found = preg_match("/[a-fA-F0-9]{4}-[a-fA-F0-9]{8}-[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{8}/", $url, $matches);
|
$found = preg_match(
|
||||||
|
'/[a-fA-F0-9]{4}-[a-fA-F0-9]{8}-[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{8}/',
|
||||||
|
$url,
|
||||||
|
$matches,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if ($found == 0) {
|
if ($found == 0) {
|
||||||
$found = preg_match("/\/[a-fA-F0-9]{24}/", $url, $matches);
|
$found = preg_match("/\/[a-fA-F0-9]{24}/", $url, $matches);
|
||||||
if (isset($matches[0])) {
|
if (isset($matches[0])) {
|
||||||
$matches[0] = str_replace("/", "", $matches[0]);
|
$matches[0] = str_replace('/', '', $matches[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($found) {
|
if ($found) {
|
||||||
$motiv = $this->mongoDb
|
$motiv = $this->mongoDb->getRepository(Motiv::class)->find($matches[0]);
|
||||||
->getRepository(Motiv::class)
|
|
||||||
->find($matches[0]);
|
|
||||||
|
|
||||||
if (!$motiv) {
|
if (!$motiv) {
|
||||||
$motiv = $this->entityManager
|
$motiv = $this->entityManager
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Motiv')->findOneByUuid($matches[0]);
|
->getRepository('PSC\Shop\EntityBundle\Entity\Motiv')
|
||||||
|
->findOneByUuid($matches[0]);
|
||||||
}
|
}
|
||||||
if ($motiv) {
|
if ($motiv) {
|
||||||
$svgContent = str_replace($url, "../market/motive/" . $motiv->getFileOrginal(), $svgContent);
|
$svg = str_replace($url, '/data/www/old/market/motive/' . $motiv->getFileOrginal(), $svg);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($found == 0) {
|
|
||||||
$found = preg_match("/calendar\/render\/[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{1,4}\/[0-9]{1,6}\/[0-9]{1,6}\/[0-9]{1,3}\/[0-9]{1,3}\/[a-fA-F0-9]{6}\/[a-fA-F0-9]{6}\/[a-fA-F0-9]{6}\/[a-fA-F0-9]{1}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/.{1,40}/", $url, $matches);
|
|
||||||
} elseif ($found == 0) {
|
|
||||||
$found = preg_match("/calendar\/render\/[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{1,4}\/[0-9]{1,6}\/[0-9]{1,6}\/[0-9]{1,3}\/[0-9]{1,3}\/[a-fA-F0-9]{6}\/[a-fA-F0-9]{6}\/[a-fA-F0-9]{6}\/[a-fA-F0-9]{1}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}\/[0-9]{1,3}/", $url, $matches);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($found) {
|
$template = $this->twig->createTemplate($svg);
|
||||||
$matches = explode("/", $matches[0]);
|
$svg = $template->render([
|
||||||
|
'row' => $row,
|
||||||
|
]);
|
||||||
|
$tmpSvg = tempnam(sys_get_temp_dir(), 'svg_') . '.svg';
|
||||||
|
$tmpPdf = tempnam(sys_get_temp_dir(), 'pdf_') . '.pdf';
|
||||||
|
file_put_contents($tmpSvg, $svg);
|
||||||
|
$cmd =
|
||||||
|
'cairosvg ' . escapeshellarg($tmpSvg) . ' -f pdf -o ' . escapeshellarg($tmpPdf) . ' --unsafe 2>&1';
|
||||||
|
exec($cmd, $output, $ret);
|
||||||
|
|
||||||
$calendarDesign = new Design();
|
unlink($tmpSvg);
|
||||||
|
|
||||||
switch ($matches[2]) {
|
$tempFiles[] = $tmpPdf;
|
||||||
case 4:
|
|
||||||
$calendarType = new Hoch($this->container);
|
|
||||||
$calendarDesign->setHeight($matches[6]);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
$calendarType = new Hochvariable($this->container);
|
|
||||||
$calendarDesign->setHeight($matches[6]);
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
default:
|
|
||||||
$calendarType = new Quer($this->container);
|
|
||||||
}
|
|
||||||
|
|
||||||
$calendarDesign->setRenderMonth($matches[3]);
|
|
||||||
$calendarDesign->setStartYear($matches[4]);
|
|
||||||
$calendarDesign->setWidth($matches[5]);
|
|
||||||
$calendarDesign->setMonthSize($matches[7]);
|
|
||||||
$calendarDesign->setDaySize($matches[8]);
|
|
||||||
$calendarDesign->setMonthColor('#' . $matches[9]);
|
|
||||||
$calendarDesign->setDayColor('#' . $matches[10]);
|
|
||||||
$calendarDesign->setSunColor('#' . $matches[11]);
|
|
||||||
$calendarDesign->setDisplayYear($matches[12]);
|
|
||||||
$calendarDesign->setDisplayHeightMounthCal($matches[13]);
|
|
||||||
$calendarDesign->setDisplayMarginCal($matches[14]);
|
|
||||||
$calendarDesign->setCalendarX($matches[15]);
|
|
||||||
$calendarDesign->setCalendarY($matches[16]);
|
|
||||||
$calendarDesign->setYearX($matches[17]);
|
|
||||||
$calendarDesign->setYearY($matches[18]);
|
|
||||||
$calendarDesign->setCalendarWidth($matches[19]);
|
|
||||||
$calendarDesign->setCalendarHeight($matches[20]);
|
|
||||||
$calendarDesign->setMonthX($matches[21]);
|
|
||||||
$calendarDesign->setMonthY($matches[22]);
|
|
||||||
$calendarDesign->setYearSize($matches[23]);
|
|
||||||
if (isset($matches[24])) {
|
|
||||||
$calendarDesign->setFontFamily(urldecode($matches[24]));
|
|
||||||
}
|
|
||||||
$calendarType->setDesign($calendarDesign);
|
|
||||||
$calendarGenerator = new Generator();
|
|
||||||
$calendarGenerator->setType($calendarType);
|
|
||||||
$cal = $calendarGenerator->render();
|
|
||||||
|
|
||||||
//$svgContent = preg_replace('/<image.*calendar.+<\/image>/', $cal, $svgContent);
|
|
||||||
$svgContent = str_replace($url, $cal, $svgContent);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$template = $this->twig->createTemplate($svgContent);
|
$allPdfs = implode(' ', array_map('escapeshellarg', $tempFiles));
|
||||||
$svgContent = $template->render(array(
|
|
||||||
'row' => $row
|
|
||||||
));
|
|
||||||
file_put_contents($this->kernel->getProjectDir() . "/web/temp/" . $layouter_uuid . '_' . $key . ".svg", $svgContent);
|
|
||||||
|
|
||||||
$width = $site['width'] + $dataArray['sites'][$key + 1]['trimLeft'] + $dataArray['sites'][$key + 1]['trimRight'];
|
|
||||||
$height = $site['height'] + $dataArray['sites'][$key + 1]['trimTop'] + $dataArray['sites'][$key + 1]['trimBottom'];
|
|
||||||
|
|
||||||
if (isset($dataArray['pdfPrintMerge']['sites']) && $key == 0) {
|
|
||||||
$p->begin_page_ext(0, 0, "width=" . $dataArray['pdfPrintMerge']['width'] . " height=" . $dataArray['pdfPrintMerge']['height']);
|
|
||||||
$pageOpen = true;
|
|
||||||
} elseif (isset($dataArray['pdfPrintMerge']['sites']) && $key > 0 && in_array($key + 1, $dataArray['pdfPrintMerge']['sites'])) {
|
|
||||||
} else {
|
|
||||||
$p->begin_page_ext(0, 0, "width=" . $width . " height=" . $height . " trimbox={" . $dataArray['sites'][$key + 1]['trimLeft'] . " "
|
|
||||||
. $dataArray['sites'][$key + 1]['trimTop'] . " " . ($site['width'] + $dataArray['sites'][$key + 1]['trimLeft']) . " " . ($site['height'] + $dataArray['sites'][$key + 1]['trimTop']) . "}");
|
|
||||||
$pageOpen = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$graphics = $p->load_graphics("auto", $this->kernel->getProjectDir() . "/web/temp/" . $layouter_uuid . '_' . $key . ".svg", "");
|
|
||||||
|
|
||||||
$optlist = "boxsize={" . $width . " " . $height . "} position={top left} fitmethod=meet";
|
|
||||||
|
|
||||||
if ($p->info_graphics($graphics, "fittingpossible", $optlist) == 1) {
|
|
||||||
if (isset($dataArray['pdfPrintMerge']['sites']) && in_array($key + 1, $dataArray['pdfPrintMerge']['sites'])) {
|
|
||||||
if ($dataArray['sites'][$key + 1]['clipBox']) {
|
|
||||||
$clipBox = explode(" ", $dataArray['sites'][$key + 1]['clipBox']);
|
|
||||||
$p->save();
|
|
||||||
$p->rect($dataArray['sites'][$key + 1]['mergePosX'] + $clipBox[0], $dataArray['sites'][$key + 1]['mergePosY'] + $clipBox[1], $clipBox[2], $clipBox[3]);
|
|
||||||
$p->clip();
|
|
||||||
}
|
|
||||||
$p->fit_graphics($graphics, $dataArray['sites'][$key + 1]['mergePosX'], $dataArray['sites'][$key + 1]['mergePosY'], $optlist);
|
|
||||||
if ($dataArray['sites'][$key + 1]['clipBox']) {
|
|
||||||
$p->restore();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$p->fit_graphics($graphics, 0, 0, $optlist);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$p->close_graphics($graphics);
|
|
||||||
$p->end_layer();
|
|
||||||
|
|
||||||
if ($cal) {
|
|
||||||
$indocCal = $p->open_pdi_document($cal, "");
|
|
||||||
if ($indocCal == 0) {
|
|
||||||
throw new \Exception("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
$pageCal = $p->open_pdi_page($indocCal, 1, "");
|
|
||||||
if ($pageCal == 0) {
|
|
||||||
throw new \Exception("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
$layerCal = $p->define_layer("cal", "");
|
|
||||||
$p->begin_layer($layerCal);
|
|
||||||
|
|
||||||
$p->fit_pdi_page($pageCal, $dataArray['sites'][$key + 1]['calendar']['x'] + $dataArray['sites'][$key + 1]['trimLeft'], $dataArray['sites'][$key + 1]['trimBottom'] + $site['height'] - $dataArray['sites'][$key + 1]['calendar']['y'] - $dataArray['sites'][$key + 1]['calendar']['height'], "");
|
|
||||||
|
|
||||||
$p->close_pdi_page($pageCal);
|
|
||||||
|
|
||||||
$p->end_layer();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($dataArray['sites'][$key + 1]['elements']) {
|
|
||||||
foreach ($dataArray['sites'][$key + 1]['elements'] as $element) {
|
|
||||||
if ($element['type'] == "stanze") {
|
|
||||||
$stanze = $this->mongoDb
|
|
||||||
->getRepository(Motiv::class)
|
|
||||||
->find($element['value']);
|
|
||||||
|
|
||||||
if (!$stanze) {
|
|
||||||
$stanze = $this->entityManager
|
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Motiv')->findOneByUuid($element['value']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$indocStanze = $p->open_pdi_document($this->kernel->getProjectDir() . "/web/market/motive/" . $stanze->getFileOrginal(), "");
|
|
||||||
if ($indocStanze == 0) {
|
|
||||||
throw new \Exception("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
$pageStanze = $p->open_pdi_page($indocStanze, 1, "");
|
|
||||||
if ($pageStanze == 0) {
|
|
||||||
throw new \Exception("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
$layerStanze = $p->define_layer("stanze", "");
|
|
||||||
$p->begin_layer($layerStanze);
|
|
||||||
|
|
||||||
/* Place the imported page on the German layer of the output page */
|
|
||||||
if (isset($dataArray['pdfPrintMerge']['sites']) && in_array($key + 1, $dataArray['pdfPrintMerge']['sites'])) {
|
|
||||||
$p->fit_pdi_page($pageStanze, $dataArray['sites'][$key + 1]['mergePosX'] + $element['x'], $dataArray['sites'][$key + 1]['mergePosY'] + $element['y'], "");
|
|
||||||
} else {
|
|
||||||
$p->fit_pdi_page($pageStanze, 0, 0, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
$p->close_pdi_page($pageStanze);
|
|
||||||
|
|
||||||
$p->end_layer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($dataArray['sites'][$key + 1]['elements']) {
|
|
||||||
foreach ($dataArray['sites'][$key + 1]['elements'] as $element) {
|
|
||||||
if ($element['type'] == "barcode") {
|
|
||||||
$barcodefont = $p->load_font("fre3of9x", "unicode", "embedding");
|
|
||||||
$font = $p->load_font("Verdana", "unicode", "");
|
|
||||||
if ($barcodefont == 0) {
|
|
||||||
throw new Exception("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($dataArray['pdfPrintMerge']['sites']) && in_array($key + 1, $dataArray['pdfPrintMerge']['sites'])) {
|
|
||||||
$p->fit_textline($alias, $dataArray['sites'][$key + 1]['mergePosX'] + $element['x'], $dataArray['sites'][$key + 1]['mergePosY'] + $element['y'], "font=" . $barcodefont .
|
|
||||||
" rotate=90 fontsize=" . $element['fontSize']);
|
|
||||||
$p->fit_textline($alias, $dataArray['sites'][$key + 1]['mergePosX'] + $element['x'] + 10, $dataArray['sites'][$key + 1]['mergePosY'] + $element['y'], "font=" . $font .
|
|
||||||
" rotate=90 fontsize=10");
|
|
||||||
} else {
|
|
||||||
$p->fit_textline($alias, $element['x'], $element['y'], "font=" . $barcodefont .
|
|
||||||
" rotate=" . $element['rotate'] . " fontsize=" . $element['fontSize'] . " " .
|
|
||||||
"fillcolor={black 1} " .
|
|
||||||
"matchbox={fillcolor={white 1} " .
|
|
||||||
"boxheight={ascender descender} " .
|
|
||||||
"offsetleft=-8 offsetright=8 offsettop=8 offsetbottom=-12}");
|
|
||||||
if (isset($element['addTextX'])) {
|
|
||||||
$p->fit_textline($alias, $element['x'], $element['y'] - 12, "font=" . $font .
|
|
||||||
" rotate=" . $element['rotate'] . " fontsize=10 " .
|
|
||||||
"fillcolor={black 1} " .
|
|
||||||
"matchbox={fillcolor={white 1} " .
|
|
||||||
"boxheight={ascender descender} " .
|
|
||||||
"offsetleft=-8 offsetright=8 offsettop=0 offsetbottom=0}");
|
|
||||||
$p->fit_textline($element['addText'], $element['addTextX'], $element['addTextY'], "font=" . $font .
|
|
||||||
" rotate=" . $element['rotate'] . " fontsize=10 " .
|
|
||||||
"fillcolor={black 1} " .
|
|
||||||
"matchbox={fillcolor={white 1} " .
|
|
||||||
"boxheight={ascender descender} " .
|
|
||||||
"offsetleft=-8 offsetright=8 offsettop=0 offsetbottom=0}");
|
|
||||||
} else {
|
|
||||||
$p->fit_textline($alias . $element['addText'], $element['x'], $element['y'] - 12, "font=" . $font .
|
|
||||||
" rotate=" . $element['rotate'] . " fontsize=10 " .
|
|
||||||
"fillcolor={black 1} " .
|
|
||||||
"matchbox={fillcolor={white 1} " .
|
|
||||||
"boxheight={ascender descender} " .
|
|
||||||
"offsetleft=-8 offsetright=8 offsettop=0 offsetbottom=0}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$dataArray['pdfPrintMerge']) {
|
|
||||||
$p->end_page_ext("");
|
|
||||||
$pageOpen = false;
|
|
||||||
} elseif (isset($dataArray['pdfPrintMerge']['sites']) && $key > 0 && !in_array($key + 1, $dataArray['pdfPrintMerge']['sites'])) {
|
|
||||||
$p->end_page_ext("");
|
|
||||||
$pageOpen = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($pageOpen) {
|
|
||||||
if (isset($dataArray['pdfPrintMerge']['stanze'])) {
|
|
||||||
$stanze = $this->mongoDb
|
|
||||||
->getRepository(Motiv::class)
|
|
||||||
->find((string)$dataArray['pdfPrintMerge']['stanze']);
|
|
||||||
|
|
||||||
if (!$stanze) {
|
|
||||||
$stanze = $this->entityManager
|
|
||||||
->getRepository('PSC\Shop\EntityBundle\Entity\Motiv')->findOneByUuid((string)$dataArray['pdfPrintMerge']['stanze']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$indocStanze = $p->open_pdi_document($this->kernel->getProjectDir() . "/web/market/motive/" . $stanze->getFileOrginal(), "");
|
|
||||||
if ($indocStanze == 0) {
|
|
||||||
throw new \Exception("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
$pageStanze = $p->open_pdi_page($indocStanze, 1, "");
|
|
||||||
if ($pageStanze == 0) {
|
|
||||||
throw new \Exception("Error: " . $p->get_errmsg());
|
|
||||||
}
|
|
||||||
|
|
||||||
$layerStanze = $p->define_layer("stanze", "");
|
|
||||||
$p->begin_layer($layerStanze);
|
|
||||||
|
|
||||||
/* Place the imported page on the German layer of the output page */
|
|
||||||
$p->fit_pdi_page($pageStanze, 0, 0, "");
|
|
||||||
|
|
||||||
$p->close_pdi_page($pageStanze);
|
|
||||||
|
|
||||||
$p->end_layer();
|
|
||||||
}
|
|
||||||
|
|
||||||
$p->end_page_ext("");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$p->end_document("");
|
|
||||||
|
|
||||||
|
$cmd = 'pdfunite ' . $allPdfs . ' ' . escapeshellarg($outfilename) . ' 2>&1';
|
||||||
|
exec($cmd, $out, $ret);
|
||||||
|
|
||||||
foreach ($tempFiles as $file) {
|
foreach ($tempFiles as $file) {
|
||||||
unlink($file);
|
unlink($file);
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{% extends 'backend_tailwind_base.html.twig' %}
|
{% extends 'backend_tailwind_base.html.twig' %}
|
||||||
|
{% form_theme form 'tailwind_formtheme.html.twig' %}
|
||||||
{% trans_default_domain 'core_order_list' %}
|
{% trans_default_domain 'core_order_list' %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
@ -31,7 +32,6 @@
|
|||||||
Filtern nach Auftragsstatus (Positionsstatus wird nicht berücksichtigt):
|
Filtern nach Auftragsstatus (Positionsstatus wird nicht berücksichtigt):
|
||||||
</label>
|
</label>
|
||||||
{{ form_widget(form.status, {attr: {
|
{{ form_widget(form.status, {attr: {
|
||||||
class: 'w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:ring-2 focus:ring-psc-500 focus:border-psc-500 transition-all text-sm'
|
|
||||||
}}) }}
|
}}) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 min-w-[300px]">
|
<div class="flex-1 min-w-[300px]">
|
||||||
@ -123,9 +123,14 @@
|
|||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div class="hidden absolute right-0 z-10 mt-1 w-48 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5">
|
<div class="hidden absolute right-0 z-10 mt-1 w-56 rounded-sm shadow-xl bg-white border border-gray-200 py-1">
|
||||||
{% for status in orderStatuse.getOrderStatuse %}
|
{% for status in orderStatuse.getOrderStatuse %}
|
||||||
<a href="{{ path("psc_shop_order_backend_list_switchstatus", {order: order.uuid, status: status.code}) }}" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">{{ status.internalName|trans({}, 'status') }}</a>
|
<a href="{{ path("psc_shop_order_backend_list_switchstatus", {order: order.uuid, status: status.code}) }}" class="flex items-center px-3 py-1.5 text-xs text-gray-700 hover:bg-psc-50 hover:text-psc-700 transition-colors">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-3.5 h-3.5 mr-2 text-gray-400">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
|
</svg>
|
||||||
|
{{ status.internalName|trans({}, 'status') }}
|
||||||
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -43,7 +43,12 @@ readonly class Product
|
|||||||
$product->setUid($productEntity->getUID());
|
$product->setUid($productEntity->getUID());
|
||||||
$product->setTitle($productEntity->getTitle());
|
$product->setTitle($productEntity->getTitle());
|
||||||
$product->setUuid($productEntity->getUUID());
|
$product->setUuid($productEntity->getUUID());
|
||||||
|
if ($productEntity->getLanguage() == null) {
|
||||||
|
$product->setLanguage('all');
|
||||||
|
} else {
|
||||||
$product->setLanguage($productEntity->getLanguage());
|
$product->setLanguage($productEntity->getLanguage());
|
||||||
|
}
|
||||||
|
|
||||||
$product->setLangData($productEntity->getLangData());
|
$product->setLangData($productEntity->getLangData());
|
||||||
$product->setTextArt((string) $productEntity->getTextArt());
|
$product->setTextArt((string) $productEntity->getTextArt());
|
||||||
$product->setPrice((int) $productEntity->getPrice());
|
$product->setPrice((int) $productEntity->getPrice());
|
||||||
|
|||||||
@ -6,6 +6,7 @@ class Version20251202130922 extends Base
|
|||||||
{
|
{
|
||||||
public function migrateDatabase(): void
|
public function migrateDatabase(): void
|
||||||
{
|
{
|
||||||
$this->entityManager->getConnection()->exec("ALTER TABLE cms MODIFY sor int(4) null;");
|
$this->entityManager->getConnection()->exec("update cms set sor = 1 where sor = '';");
|
||||||
|
$this->entityManager->getConnection()->exec('ALTER TABLE cms MODIFY sor int(4) null;');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,9 +57,10 @@
|
|||||||
{% set required = false %}
|
{% set required = false %}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{% if multiple %}
|
{% if multiple %}
|
||||||
<div class="row">
|
<div class="grid grid-cols-12 gap-3" data-multiselect-widget>
|
||||||
<div class="col-5">
|
<div class="col-span-5">
|
||||||
<select name="{{ full_name }}_from" id="{{ full_name|md5 }}" class="form-control form-control-sm multiple" size="8" multiple="multiple">
|
<label class="block text-xs font-medium text-gray-700 mb-1">Verfügbar</label>
|
||||||
|
<select name="{{ full_name }}_from" id="{{ full_name|md5 }}" class="w-full border border-gray-300 rounded-sm text-sm p-2 focus:ring-2 focus:ring-psc-500 focus:border-psc-500" size="8" multiple="multiple">
|
||||||
{%- set options = choices -%}
|
{%- set options = choices -%}
|
||||||
{% for group_label, choice in options %}
|
{% for group_label, choice in options %}
|
||||||
{%- if choice is iterable -%}
|
{%- if choice is iterable -%}
|
||||||
@ -76,15 +77,32 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-2">
|
<div class="col-span-2 flex flex-col justify-center gap-2">
|
||||||
<button type="button" id="{{ full_name|md5 }}_rightAll" class="btn btn-sm btn-block"><i class="fa fa-forward"></i></button>
|
<button type="button" id="{{ full_name|md5 }}_rightAll" class="inline-flex items-center justify-center px-3 py-2 text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-psc-500" title="Alle nach rechts">
|
||||||
<button type="button" id="{{ full_name|md5 }}_rightSelected" class="btn btn-sm btn-block"><i class="fa fa-chevron-right"></i></button>
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||||
<button type="button" id="{{ full_name|md5 }}_leftSelected" class="btn btn-sm btn-block"><i class="fa fa-chevron-left"></i></button>
|
<path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" />
|
||||||
<button type="button" id="{{ full_name|md5 }}_leftAll" class="btn btn-sm btn-block"><i class="fa fa-backward"></i></button>
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button type="button" id="{{ full_name|md5 }}_rightSelected" class="inline-flex items-center justify-center px-3 py-2 text-xs font-medium text-white bg-psc-500 border border-psc-500 rounded-sm hover:bg-psc-600 focus:outline-none focus:ring-2 focus:ring-psc-500" title="Ausgewählte nach rechts">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button type="button" id="{{ full_name|md5 }}_leftSelected" class="inline-flex items-center justify-center px-3 py-2 text-xs font-medium text-white bg-psc-500 border border-psc-500 rounded-sm hover:bg-psc-600 focus:outline-none focus:ring-2 focus:ring-psc-500" title="Ausgewählte nach links">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
<button type="button" id="{{ full_name|md5 }}_leftAll" class="inline-flex items-center justify-center px-3 py-2 text-xs font-medium text-gray-700 bg-white border border-gray-300 rounded-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-psc-500" title="Alle nach links">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-5">
|
<div class="col-span-5">
|
||||||
<select name="{{ full_name }}" id="{{ full_name|md5 }}_to" class="form-control form-control-sm" size="8" multiple="multiple">
|
<label class="block text-xs font-medium text-gray-700 mb-1">Ausgewählt</label>
|
||||||
|
<select name="{{ full_name }}" id="{{ full_name|md5 }}_to" class="w-full border border-gray-300 rounded-sm text-sm p-2 focus:ring-2 focus:ring-psc-500 focus:border-psc-500" size="8" multiple="multiple">
|
||||||
{% for group_label, choice in options %}
|
{% for group_label, choice in options %}
|
||||||
{%- if choice is iterable -%}
|
{%- if choice is iterable -%}
|
||||||
<optgroup label="{{ choice_translation_domain is same as(false) ? group_label : group_label|trans({}, choice_translation_domain) }}">
|
<optgroup label="{{ choice_translation_domain is same as(false) ? group_label : group_label|trans({}, choice_translation_domain) }}">
|
||||||
|
|||||||
@ -306,7 +306,7 @@ CREATE TABLE `article` (
|
|||||||
`a4_auflagen` text DEFAULT NULL,
|
`a4_auflagen` text DEFAULT NULL,
|
||||||
`a4_sponsoring` int(1) DEFAULT NULL,
|
`a4_sponsoring` int(1) DEFAULT NULL,
|
||||||
`a4_prodzeit` varchar(255) DEFAULT NULL,
|
`a4_prodzeit` varchar(255) DEFAULT NULL,
|
||||||
`a4_abpreis` float(8,2) DEFAULT 0.00,
|
`a4_abpreis` varchar(10) DEFAULT NULL,
|
||||||
`a5_buy` int(1) DEFAULT NULL,
|
`a5_buy` int(1) DEFAULT NULL,
|
||||||
`a5_xml` text DEFAULT NULL,
|
`a5_xml` text DEFAULT NULL,
|
||||||
`layouterid` varchar(255) DEFAULT NULL,
|
`layouterid` varchar(255) DEFAULT NULL,
|
||||||
|
|||||||
@ -305,7 +305,7 @@ CREATE TABLE `article` (
|
|||||||
`a4_auflagen` text DEFAULT NULL,
|
`a4_auflagen` text DEFAULT NULL,
|
||||||
`a4_sponsoring` int(1) DEFAULT NULL,
|
`a4_sponsoring` int(1) DEFAULT NULL,
|
||||||
`a4_prodzeit` varchar(255) DEFAULT NULL,
|
`a4_prodzeit` varchar(255) DEFAULT NULL,
|
||||||
`a4_abpreis` float(20,2) DEFAULT NULL,
|
`a4_abpreis` varchar(20) DEFAULT NULL,
|
||||||
`a5_buy` int(1) DEFAULT NULL,
|
`a5_buy` int(1) DEFAULT NULL,
|
||||||
`a5_xml` text DEFAULT NULL,
|
`a5_xml` text DEFAULT NULL,
|
||||||
`layouterid` varchar(255) NOT NULL,
|
`layouterid` varchar(255) NOT NULL,
|
||||||
|
|||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\Artikelimport\Document;
|
namespace Plugin\Custom\Krueger\Artikelimport\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Import
|
class Import
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Import
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -832,11 +832,13 @@ if($variMaterialNo == "3200 S")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$produktchecknoActive = $this->_entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Product')->findBy(array('shop' => $selectedShop));
|
$produktchecknoActive = $this->_entityManager->getRepository('PSC\Shop\EntityBundle\Entity\Product')->findBy(array('shop' => $selectedShop));
|
||||||
|
$exportProdukte = [];
|
||||||
foreach($produktchecknoActive as $produktchecknoActive) {
|
foreach($produktchecknoActive as $produktchecknoActive) {
|
||||||
//\dump($produktchecknoActive->getUid());
|
//\dump($produktchecknoActive->getUid());
|
||||||
if($produktchecknoActive->getMetaKeywords() == "1") {
|
if($produktchecknoActive->getMetaKeywords() == "1") {
|
||||||
$produktchecknoActive->setEnable(true);
|
$produktchecknoActive->setEnable(true);
|
||||||
|
$exportProdukte[] = $produkt;
|
||||||
|
$this->generateGoogleMerchantXml($xml, $queueSettings->getShop(), $exportProdukte);
|
||||||
} else {
|
} else {
|
||||||
$produktchecknoActive->setEnable(NULL);
|
$produktchecknoActive->setEnable(NULL);
|
||||||
}
|
}
|
||||||
@ -888,4 +890,123 @@ $this->_entityManager->clear();
|
|||||||
return $number[0].".".substr($number[1].str_repeat("0", $decimals), 0, $decimals);
|
return $number[0].".".substr($number[1].str_repeat("0", $decimals), 0, $decimals);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function generateGoogleMerchantXml($xml, $shopId, $produktchecknoActive)
|
||||||
|
{
|
||||||
|
$outputFile = '/data/www/old/data/packages/import/google_merchants.xml';
|
||||||
|
$baseImageUrl = 'https://www.krueger-scheiben.de/styles/vorlagen/kdv_b3_dev/product_images/';
|
||||||
|
$placeholderImg = 'placeholder.jpg';
|
||||||
|
$baseProductUrl = 'https://www.krueger-scheiben.de/article/show/';
|
||||||
|
$currency = 'EUR';
|
||||||
|
|
||||||
|
$rssDom = new \DOMDocument('1.0', 'utf-8');
|
||||||
|
$rssDom->formatOutput = true;
|
||||||
|
|
||||||
|
$rss = $rssDom->createElement('rss');
|
||||||
|
$rss->setAttribute('version', '2.0');
|
||||||
|
$rss->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:g', 'http://base.google.com/ns/1.0');
|
||||||
|
$rssDom->appendChild($rss);
|
||||||
|
|
||||||
|
$channel = $rssDom->createElement('channel');
|
||||||
|
$channel->appendChild($rssDom->createElement('title', 'Krüger Scheiben - Google Merchant Feed'));
|
||||||
|
$channel->appendChild($rssDom->createElement('link', 'https://www.krueger-scheiben.de'));
|
||||||
|
$channel->appendChild($rssDom->createElement('description', 'Automatisch generierter Produktfeed aus täglichem Artikelimport'));
|
||||||
|
$rss->appendChild($channel);
|
||||||
|
|
||||||
|
$exportCount = 0;
|
||||||
|
$skipped = 0;
|
||||||
|
|
||||||
|
foreach ($xml->tblMaterials->Detail_Collection->Detail as $value) {
|
||||||
|
|
||||||
|
$variMaterialNo = (string)$value->attributes()->MaterialNo;
|
||||||
|
$variDescDE = (string)$value->attributes()->DescDE;
|
||||||
|
$variAddDescDE = (string)$value->attributes()->AddDescDE;
|
||||||
|
$variAdd2DescDE = (string)$value->attributes()->Add2DescDE;
|
||||||
|
$variImage = (string)$value->attributes()->Image;
|
||||||
|
$variClientNo = (string)$value->attributes()->ClientNo;
|
||||||
|
$variPrice = (float)$value->attributes()->Price;
|
||||||
|
$variPriceInd = (int)$value->attributes()->PriceInd;
|
||||||
|
$variPalletAmount = (int)$value->attributes()->PalletAmount;
|
||||||
|
$variAsOfAmount1 = (int)$value->attributes()->AsOfAmount1;
|
||||||
|
$variPriceStep1 = (float)$value->attributes()->PriceStep1;
|
||||||
|
$variTaxKey = (int)$value->attributes()->TaxKey;
|
||||||
|
$variEAN = (string)$value->attributes()->EAN;
|
||||||
|
|
||||||
|
// --- Filter ---
|
||||||
|
if ($variClientNo !== '' || stripos($variDescDE, 'Gutschrift') !== false) {
|
||||||
|
$skipped++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- URL exakt wie im Import ---
|
||||||
|
$urlcheck = $this->_entityManager
|
||||||
|
->getRepository('PSC\Shop\EntityBundle\Entity\Product')
|
||||||
|
->findBy(['shop' => $shopId, 'title' => $variDescDE]);
|
||||||
|
|
||||||
|
if (count($urlcheck) == 1) {
|
||||||
|
$inurl = $this->shortText($this->clean(strtolower($variDescDE)), 100);
|
||||||
|
} else {
|
||||||
|
$inurl = $this->shortText($this->clean(strtolower($variDescDE)), 100) . '-' .
|
||||||
|
$this->clean(strtolower($variMaterialNo));
|
||||||
|
}
|
||||||
|
|
||||||
|
$productUrl = $baseProductUrl . $inurl;
|
||||||
|
|
||||||
|
// --- Preislogik ---
|
||||||
|
switch ($variPriceInd) {
|
||||||
|
case 1: $variPrice /= 10; $variPriceStep1 /= 10; break;
|
||||||
|
case 2: $variPrice /= 100; $variPriceStep1 /= 100; break;
|
||||||
|
case 3: $variPrice /= 1000; $variPriceStep1 /= 1000; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
$variPrice *= $variPalletAmount;
|
||||||
|
$variPriceStep1 *= $variPalletAmount;
|
||||||
|
|
||||||
|
// --- MwSt ---
|
||||||
|
$mwstFactor = ($variTaxKey == 5 || $variTaxKey == 21) ? 1.07 : 1.19;
|
||||||
|
$priceGross = $variPrice * $mwstFactor;
|
||||||
|
$priceStep1Gross = $variPriceStep1 * $mwstFactor;
|
||||||
|
|
||||||
|
// --- Beschreibung ---
|
||||||
|
$description = $variAddDescDE . "\n" . $variAdd2DescDE;
|
||||||
|
if ($variAsOfAmount1 > 0 && $variPriceStep1 > 0) {
|
||||||
|
$description .= "\nPreisstaffel: 1–{$variAsOfAmount1} = "
|
||||||
|
. number_format($priceGross, 2, ',', '') . " € / ab {$variAsOfAmount1} = "
|
||||||
|
. number_format($priceStep1Gross, 2, ',', '') . " €";
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Bild ---
|
||||||
|
$imgUrl = ($variImage && strtolower($variImage) !== 'none.jpg')
|
||||||
|
? $baseImageUrl . rawurlencode($variImage)
|
||||||
|
: $baseImageUrl . $placeholderImg;
|
||||||
|
|
||||||
|
// --- XML-Item ---
|
||||||
|
$item = $rssDom->createElement('item');
|
||||||
|
$item->appendChild($rssDom->createElement('g:id', htmlspecialchars($variMaterialNo)));
|
||||||
|
$item->appendChild($rssDom->createElement('title', htmlspecialchars($variDescDE)));
|
||||||
|
$item->appendChild($rssDom->createElement('description', htmlspecialchars($description)));
|
||||||
|
$item->appendChild($rssDom->createElement('link', $productUrl));
|
||||||
|
$item->appendChild($rssDom->createElement('g:image_link', $imgUrl));
|
||||||
|
$item->appendChild($rssDom->createElement('g:price', number_format($priceGross, 2, '.', '') . ' ' . $currency));
|
||||||
|
$item->appendChild($rssDom->createElement('g:unit_pricing_measure', max(1, $variPalletAmount) . ' Stück'));
|
||||||
|
$item->appendChild($rssDom->createElement('g:unit_pricing_base_measure', '1 Stück'));
|
||||||
|
|
||||||
|
if ($variEAN !== '') {
|
||||||
|
$item->appendChild($rssDom->createElement('g:gtin', htmlspecialchars($variEAN)));
|
||||||
|
}
|
||||||
|
|
||||||
|
$item->appendChild($rssDom->createElement('g:availability', 'in stock'));
|
||||||
|
$item->appendChild($rssDom->createElement('g:condition', 'new'));
|
||||||
|
$channel->appendChild($item);
|
||||||
|
|
||||||
|
$exportCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rssDom->save($outputFile);
|
||||||
|
|
||||||
|
echo "✅ Google Merchant Feed erzeugt: $outputFile\n";
|
||||||
|
echo "📦 Exportiert: $exportCount Produkte\n";
|
||||||
|
echo "🚫 Übersprungen: $skipped Produkte\n";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
<div class="panel">
|
||||||
|
<div class="header">
|
||||||
|
<h4>Details</h4>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-1 form-control-label">{{ form_label(form.file) }}</label>
|
||||||
|
<div class="col-md-11">
|
||||||
|
{{ form_widget(form.file) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-1 form-control-label">{{ form_label(form.shop) }}</label>
|
||||||
|
<div class="col-md-11">
|
||||||
|
{{ form_widget(form.shop) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\ArtikelimportEN\Document;
|
namespace Plugin\Custom\Krueger\ArtikelimportEN\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Import
|
class Import
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Import
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\ArtikelimportFR\Document;
|
namespace Plugin\Custom\Krueger\ArtikelimportFR\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Import
|
class Import
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Import
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -281,7 +281,7 @@ $inarraycheckb = array();
|
|||||||
|
|
||||||
|
|
||||||
$variMatGroupNo = $value->attributes()->MatGroupNo;
|
$variMatGroupNo = $value->attributes()->MatGroupNo;
|
||||||
$variGrDescDEName = strtolower($value->attributes()->GrDescFR);
|
$variGrDescDEName = strtolower($value->attributes()->GrDescDE);
|
||||||
|
|
||||||
$variGrDescDE = $value->attributes()->GrDescDE;
|
$variGrDescDE = $value->attributes()->GrDescDE;
|
||||||
$variGrDescEN = $value->attributes()->GrDescEN;
|
$variGrDescEN = $value->attributes()->GrDescEN;
|
||||||
@ -639,6 +639,12 @@ $inarraycheckb = array();
|
|||||||
$description = "" . $variAddDescFR . "<br />" . $variAdd2DescFR;
|
$description = "" . $variAddDescFR . "<br />" . $variAdd2DescFR;
|
||||||
$produktcheck->setMetaCustomTitle($staffelpreis);
|
$produktcheck->setMetaCustomTitle($staffelpreis);
|
||||||
$produktcheck->setType(6);
|
$produktcheck->setType(6);
|
||||||
|
if ($variWeight2 != "" AND $variWeight2 != NULL) {
|
||||||
|
$gewichtinkalk = $variWeight2 * 1000;
|
||||||
|
$gewichtinkalk = intval($gewichtinkalk);
|
||||||
|
} else {
|
||||||
|
$gewichtinkalk = 0;
|
||||||
|
}
|
||||||
$produktcheck->setCalcXml('<kalkulation>
|
$produktcheck->setCalcXml('<kalkulation>
|
||||||
<artikel>
|
<artikel>
|
||||||
<name>' . str_replace(array("<br>", "<br />", "&", "$"), " ", $variDescFR) . '</name>
|
<name>' . str_replace(array("<br>", "<br />", "&", "$"), " ", $variDescFR) . '</name>
|
||||||
@ -649,6 +655,11 @@ $inarraycheckb = array();
|
|||||||
<grenze formel="($Vauflage$V*' . round($variPriceStep1, 2) . ')">' . $variAsOfAmount1b . '-</grenze>
|
<grenze formel="($Vauflage$V*' . round($variPriceStep1, 2) . ')">' . $variAsOfAmount1b . '-</grenze>
|
||||||
</auflage>
|
</auflage>
|
||||||
</option>
|
</option>
|
||||||
|
<option id="weight" name="weight" type="Hidden">
|
||||||
|
<auflage>
|
||||||
|
<grenze formel="('. $gewichtinkalk .'*$Vauflage$V)">1-</grenze>
|
||||||
|
</auflage>
|
||||||
|
</option>
|
||||||
</artikel>
|
</artikel>
|
||||||
</kalkulation>
|
</kalkulation>
|
||||||
');
|
');
|
||||||
|
|||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\Artikelkundenimport\Document;
|
namespace Plugin\Custom\Krueger\Artikelkundenimport\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Import
|
class Import
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Import
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,37 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\Customermail\Document;
|
namespace Plugin\Custom\Krueger\Customermail\Document;
|
||||||
|
|
||||||
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Document;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Document;
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Id;
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\File;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\File;
|
||||||
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Id;
|
||||||
|
|
||||||
/**
|
#[Document(collection: 'ShopFormular')]
|
||||||
* @Document(collection="ShopFormular")
|
|
||||||
*/
|
|
||||||
class Maildata
|
class Maildata
|
||||||
{
|
{
|
||||||
/**
|
#[Id]
|
||||||
* @Id
|
|
||||||
*/
|
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $days
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $days;
|
protected $days;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $setstatus
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $setstatus;
|
protected $setstatus;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
@ -79,5 +67,4 @@ class Maildata
|
|||||||
{
|
{
|
||||||
$this->setstatus = $setstatus;
|
$this->setstatus = $setstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\Kundenimport\Document;
|
namespace Plugin\Custom\Krueger\Kundenimport\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Import
|
class Import
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Import
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
<div class="panel">
|
||||||
|
<div class="header">
|
||||||
|
<h4>Details</h4>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-1 form-control-label">{{ form_label(form.file) }}</label>
|
||||||
|
<div class="col-md-11">
|
||||||
|
{{ form_widget(form.file) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-1 form-control-label">{{ form_label(form.account) }}</label>
|
||||||
|
<div class="col-md-11">
|
||||||
|
{{ form_widget(form.account) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group row">
|
||||||
|
<label class="col-md-1 form-control-label">{{ form_label(form.shop) }}</label>
|
||||||
|
<div class="col-md-11">
|
||||||
|
{{ form_widget(form.shop) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\MegalithOrderexport\Document;
|
namespace Plugin\Custom\Krueger\MegalithOrderexport\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Export
|
class Export
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Export
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
<div class="panel">
|
||||||
|
<div class="header">
|
||||||
|
<h4>Details</h4>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\MegalithOrderexportEN\Document;
|
namespace Plugin\Custom\Krueger\MegalithOrderexportEN\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Export
|
class Export
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Export
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\MegalithOrderexportFR\Document;
|
namespace Plugin\Custom\Krueger\MegalithOrderexportFR\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Export
|
class Export
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Export
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\MegalithOrderexportOrder\Document;
|
namespace Plugin\Custom\Krueger\MegalithOrderexportOrder\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Export
|
class Export
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Export
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Plugin\Custom\Krueger\MegalithOrdersaleupdate\Document;
|
namespace Plugin\Custom\Krueger\MegalithOrdersaleupdate\Document;
|
||||||
|
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\EmbeddedDocument;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
|
|
||||||
/** @EmbeddedDocument */
|
#[EmbeddedDocument]
|
||||||
class Export
|
class Export
|
||||||
{
|
{
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $file
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $file;
|
protected $file;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $account
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $account;
|
protected $account;
|
||||||
|
|
||||||
/**
|
#[Field(type: 'string')]
|
||||||
* @var string $shop
|
|
||||||
*
|
|
||||||
* @Field(type="string")
|
|
||||||
*/
|
|
||||||
protected $shop;
|
protected $shop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,6 +64,5 @@ class Export
|
|||||||
{
|
{
|
||||||
$this->shop = $shop;
|
$this->shop = $shop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
<div class="panel">
|
||||||
|
<div class="header">
|
||||||
|
<h4>Details</h4>
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1 @@
|
|||||||
|
{{ output }}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PrintshopCreator Suite
|
* PrintshopCreator Suite
|
||||||
*
|
*
|
||||||
@ -15,13 +16,9 @@ use Doctrine\ODM\MongoDB\Mapping\Annotations\Document;
|
|||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Field;
|
||||||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Id;
|
use Doctrine\ODM\MongoDB\Mapping\Annotations\Id;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Document(collection="ShopFormular")
|
|
||||||
*/
|
|
||||||
#[Document(collection: 'ShopFormular')]
|
#[Document(collection: 'ShopFormular')]
|
||||||
class Formular
|
class Formular
|
||||||
{
|
{
|
||||||
|
|
||||||
#[Id]
|
#[Id]
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
@ -224,5 +221,5 @@ class Formular
|
|||||||
{
|
{
|
||||||
$this->private = $private;
|
$this->private = $private;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -926,6 +926,10 @@ html {
|
|||||||
grid-column: span 3 / span 3;
|
grid-column: span 3 / span 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.col-span-4{
|
||||||
|
grid-column: span 4 / span 4;
|
||||||
|
}
|
||||||
|
|
||||||
.col-span-5{
|
.col-span-5{
|
||||||
grid-column: span 5 / span 5;
|
grid-column: span 5 / span 5;
|
||||||
}
|
}
|
||||||
@ -1165,6 +1169,10 @@ html {
|
|||||||
height: 0.75rem;
|
height: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-3\.5{
|
||||||
|
height: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
.h-4{
|
.h-4{
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
}
|
}
|
||||||
@ -1217,10 +1225,26 @@ html {
|
|||||||
width: 2.75rem;
|
width: 2.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-16{
|
||||||
|
width: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-24{
|
||||||
|
width: 6rem;
|
||||||
|
}
|
||||||
|
|
||||||
.w-3{
|
.w-3{
|
||||||
width: 0.75rem;
|
width: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-3\.5{
|
||||||
|
width: 0.875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-32{
|
||||||
|
width: 8rem;
|
||||||
|
}
|
||||||
|
|
||||||
.w-4{
|
.w-4{
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
@ -1233,6 +1257,10 @@ html {
|
|||||||
width: 1.25rem;
|
width: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-56{
|
||||||
|
width: 14rem;
|
||||||
|
}
|
||||||
|
|
||||||
.w-6{
|
.w-6{
|
||||||
width: 1.5rem;
|
width: 1.5rem;
|
||||||
}
|
}
|
||||||
@ -1253,6 +1281,10 @@ html {
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.min-w-\[120px\]{
|
||||||
|
min-width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
.min-w-\[180px\]{
|
.min-w-\[180px\]{
|
||||||
min-width: 180px;
|
min-width: 180px;
|
||||||
}
|
}
|
||||||
@ -2674,6 +2706,11 @@ html {
|
|||||||
background-color: rgb(79 70 229 / var(--tw-bg-opacity));
|
background-color: rgb(79 70 229 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hover\:bg-psc-50:hover{
|
||||||
|
--tw-bg-opacity: 1;
|
||||||
|
background-color: rgb(238 180 175 / var(--tw-bg-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
.hover\:bg-psc-500:hover{
|
.hover\:bg-psc-500:hover{
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(234 100 27 / var(--tw-bg-opacity));
|
background-color: rgb(234 100 27 / var(--tw-bg-opacity));
|
||||||
@ -2728,6 +2765,11 @@ html {
|
|||||||
color: rgb(234 100 27 / var(--tw-text-opacity));
|
color: rgb(234 100 27 / var(--tw-text-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hover\:text-psc-700:hover{
|
||||||
|
--tw-text-opacity: 1;
|
||||||
|
color: rgb(144 40 31 / var(--tw-text-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
.hover\:text-white:hover{
|
.hover\:text-white:hover{
|
||||||
--tw-text-opacity: 1;
|
--tw-text-opacity: 1;
|
||||||
color: rgb(255 255 255 / var(--tw-text-opacity));
|
color: rgb(255 255 255 / var(--tw-text-opacity));
|
||||||
|
|||||||
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
class market_article
|
class market_article
|
||||||
{
|
{
|
||||||
public $id = "6";
|
public $id = '6';
|
||||||
public $articlegroups;
|
public $articlegroups;
|
||||||
public $private;
|
public $private;
|
||||||
public $versandwert;
|
public $versandwert;
|
||||||
public $versand;
|
public $versand;
|
||||||
public $netto = 0;
|
public $netto = 0;
|
||||||
public $name = "Main Product";
|
public $name = 'Main Product';
|
||||||
public $template = "market_article";
|
public $template = 'market_article';
|
||||||
public $information = "Bietet Markt Produkte an";
|
public $information = 'Bietet Markt Produkte an';
|
||||||
public $backend = 'Market/config/backend.ini';
|
public $backend = 'Market/config/backend.ini';
|
||||||
public $backend_market = 'Market/config/backend_market.ini';
|
public $backend_market = 'Market/config/backend_market.ini';
|
||||||
public $frontend = 'Market/config/frontend.xml';
|
public $frontend = 'Market/config/frontend.xml';
|
||||||
@ -33,18 +33,31 @@ class market_article
|
|||||||
|
|
||||||
public function toArray()
|
public function toArray()
|
||||||
{
|
{
|
||||||
return array('thomas' => $this->thomas, 'pdf' => $this->pdf, 'template' => $this->template, 'a1_xml' => str_replace('\\', '', $this->a1_xml), 'versand' => $this->versand, 'versandwert' => $this->versandwert, 'private' => $this->private, 'articlegroups' => $this->articlegroups, 'mwert' => $this->mwert, 'title' => $this->title, 'price' => $this->price, 'text' => $this->text, 'file' => $this->file, 'file1' => $this->file1);
|
return [
|
||||||
|
'thomas' => $this->thomas,
|
||||||
|
'pdf' => $this->pdf,
|
||||||
|
'template' => $this->template,
|
||||||
|
'a1_xml' => str_replace('\\', '', $this->a1_xml),
|
||||||
|
'versand' => $this->versand,
|
||||||
|
'versandwert' => $this->versandwert,
|
||||||
|
'private' => $this->private,
|
||||||
|
'articlegroups' => $this->articlegroups,
|
||||||
|
'mwert' => $this->mwert,
|
||||||
|
'title' => $this->title,
|
||||||
|
'price' => $this->price,
|
||||||
|
'text' => $this->text,
|
||||||
|
'file' => $this->file,
|
||||||
|
'file1' => $this->file1,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createFrontend($view, $translate, Article $article, $ajax = false)
|
public function createFrontend($view, $translate, Article $article, $ajax = false)
|
||||||
{
|
{
|
||||||
|
$view->view->upload_possible = [];
|
||||||
|
|
||||||
$view->view->upload_possible = array();
|
$upload = [];
|
||||||
|
|
||||||
$upload = array();
|
|
||||||
|
|
||||||
if ($article->a6_org_article != 0) {
|
if ($article->a6_org_article != 0) {
|
||||||
|
|
||||||
if ($article->OrgArticle->upload_article) {
|
if ($article->OrgArticle->upload_article) {
|
||||||
$upload['article'] = 'Jetzt Hochladen';
|
$upload['article'] = 'Jetzt Hochladen';
|
||||||
$view->view->upload_possible[] = 'article';
|
$view->view->upload_possible[] = 'article';
|
||||||
@ -90,7 +103,6 @@ class market_article
|
|||||||
$view->view->upload_possible[] = 'multi';
|
$view->view->upload_possible[] = 'multi';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ($article->upload_article) {
|
if ($article->upload_article) {
|
||||||
$upload['article'] = 'Jetzt Hochladen';
|
$upload['article'] = 'Jetzt Hochladen';
|
||||||
$view->view->upload_possible[] = 'article';
|
$view->view->upload_possible[] = 'article';
|
||||||
@ -137,17 +149,30 @@ class market_article
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($view->getRequest()->getParam('auflage', false)) {
|
if ($view->getRequest()->getParam('auflage', false)) {
|
||||||
$view->getRequest()->setParam('auflage', str_replace(".", "", $view->getRequest()->getParam('auflage', false)));
|
$view->getRequest()->setParam(
|
||||||
$view->getRequest()->setPost('auflage', str_replace(".", "", $view->getRequest()->getParam('auflage', false)));
|
'auflage',
|
||||||
|
str_replace('.', '', $view->getRequest()->getParam('auflage', false)),
|
||||||
|
);
|
||||||
|
$view->getRequest()->setPost(
|
||||||
|
'auflage',
|
||||||
|
str_replace('.', '', $view->getRequest()->getParam('auflage', false)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (!$view->getRequest()->getParam('upload_mode', false)) {
|
if (!$view->getRequest()->getParam('upload_mode', false)) {
|
||||||
$keys = array_keys($upload);
|
$keys = array_keys($upload);
|
||||||
if (isset($keys[0])) {
|
if (isset($keys[0])) {
|
||||||
|
|
||||||
if ($article->not_edit == 1) {
|
if ($article->not_edit == 1) {
|
||||||
$_POST['upload_mode'] = 'article';
|
$_POST['upload_mode'] = 'article';
|
||||||
$view->getRequest()->setParam('upload_mode', 'article');
|
$view->getRequest()->setParam('upload_mode', 'article');
|
||||||
} elseif (count($upload) == 1 && ($view->view->upload_possible[0] == 'provided' || $view->view->upload_possible[0] == 'center' || $view->view->upload_possible[0] == 'mail' || $view->view->upload_possible[0] == 'post')) {
|
} elseif (
|
||||||
|
count($upload) == 1 &&
|
||||||
|
(
|
||||||
|
$view->view->upload_possible[0] == 'provided' ||
|
||||||
|
$view->view->upload_possible[0] == 'center' ||
|
||||||
|
$view->view->upload_possible[0] == 'mail' ||
|
||||||
|
$view->view->upload_possible[0] == 'post'
|
||||||
|
)
|
||||||
|
) {
|
||||||
$_POST['upload_mode'] = $view->view->upload_possible[0];
|
$_POST['upload_mode'] = $view->view->upload_possible[0];
|
||||||
$view->getRequest()->setParam('upload_mode', $view->view->upload_possible[0]);
|
$view->getRequest()->setParam('upload_mode', $view->view->upload_possible[0]);
|
||||||
} else {
|
} else {
|
||||||
@ -155,7 +180,10 @@ class market_article
|
|||||||
$view->getRequest()->setParam('upload_mode', 'none');
|
$view->getRequest()->setParam('upload_mode', 'none');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($view->getRequest()->getParam('layouter', false) || $view->getRequest()->getParam('openlayouter', false)) {
|
if (
|
||||||
|
$view->getRequest()->getParam('layouter', false) ||
|
||||||
|
$view->getRequest()->getParam('openlayouter', false)
|
||||||
|
) {
|
||||||
$view->getRequest()->setParam('upload_mode', 'steplayouter2');
|
$view->getRequest()->setParam('upload_mode', 'steplayouter2');
|
||||||
$_POST['upload_mode'] = 'steplayouter2';
|
$_POST['upload_mode'] = 'steplayouter2';
|
||||||
}
|
}
|
||||||
@ -176,16 +204,20 @@ class market_article
|
|||||||
if (!$ajax) {
|
if (!$ajax) {
|
||||||
$view->view->upload_mode_form = new Zend_Form();
|
$view->view->upload_mode_form = new Zend_Form();
|
||||||
$view->view->upload_mode_form->addElement('radio', 'upload_mode_select');
|
$view->view->upload_mode_form->addElement('radio', 'upload_mode_select');
|
||||||
$view->view->upload_mode_form->upload_mode_select->setLabel('Datenübertragung')
|
$view
|
||||||
|
->view
|
||||||
|
->upload_mode_form
|
||||||
|
->upload_mode_select
|
||||||
|
->setLabel('Datenübertragung')
|
||||||
->setMultiOptions($upload)
|
->setMultiOptions($upload)
|
||||||
->removeDecorator('label')->removeDecorator('HtmlTag')
|
->removeDecorator('label')
|
||||||
|
->removeDecorator('HtmlTag')
|
||||||
->setAttrib('onChange', 'this.form.submit()');
|
->setAttrib('onChange', 'this.form.submit()');
|
||||||
|
|
||||||
$view->view->upload_mode_form->valid();
|
$view->view->upload_mode_form->valid();
|
||||||
|
|
||||||
$view->view->form->addElement('hidden', 'upload_mode');
|
$view->view->form->addElement('hidden', 'upload_mode');
|
||||||
$view->view->form->upload_mode
|
$view->view->form->upload_mode->removeDecorator('label')->removeDecorator('HtmlTag');
|
||||||
->removeDecorator('label')->removeDecorator('HtmlTag');
|
|
||||||
|
|
||||||
if ($view->getRequest()->getParam('upload_mode')) {
|
if ($view->getRequest()->getParam('upload_mode')) {
|
||||||
$view->view->upload_mode = $view->getRequest()->getParam('upload_mode');
|
$view->view->upload_mode = $view->getRequest()->getParam('upload_mode');
|
||||||
@ -215,7 +247,6 @@ class market_article
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ($view->getRequest()->getParam('upload_mode')) {
|
if ($view->getRequest()->getParam('upload_mode')) {
|
||||||
$view->view->upload_mode = $view->getRequest()->getParam('upload_mode');
|
$view->view->upload_mode = $view->getRequest()->getParam('upload_mode');
|
||||||
|
|
||||||
@ -223,7 +254,13 @@ class market_article
|
|||||||
$articleBasket = $basket->getTempProduct($article->uuid);
|
$articleBasket = $basket->getTempProduct($article->uuid);
|
||||||
$articleBasket->setUploadMode($view->view->upload_mode);
|
$articleBasket->setUploadMode($view->view->upload_mode);
|
||||||
|
|
||||||
$view->view->form[] = array('type' => 'radio', 'options' => $upload, 'value' => $view->view->upload_mode, 'label' => $translate->translate('Datenübertragung'), 'name' => 'upload_mode');
|
$view->view->form[] = [
|
||||||
|
'type' => 'radio',
|
||||||
|
'options' => $upload,
|
||||||
|
'value' => $view->view->upload_mode,
|
||||||
|
'label' => $translate->translate('Datenübertragung'),
|
||||||
|
'name' => 'upload_mode',
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
$keys = array_keys($upload);
|
$keys = array_keys($upload);
|
||||||
if (isset($keys[0])) {
|
if (isset($keys[0])) {
|
||||||
@ -233,9 +270,21 @@ class market_article
|
|||||||
$articleBasket = $basket->getTempProduct($article->uuid);
|
$articleBasket = $basket->getTempProduct($article->uuid);
|
||||||
$articleBasket->setUploadMode($keys[0]);
|
$articleBasket->setUploadMode($keys[0]);
|
||||||
|
|
||||||
$view->view->form[] = array('type' => 'radio', 'options' => $upload, 'value' => $keys[0], 'label' => $translate->translate('Datenübertragung'), 'name' => 'upload_mode');
|
$view->view->form[] = [
|
||||||
|
'type' => 'radio',
|
||||||
|
'options' => $upload,
|
||||||
|
'value' => $keys[0],
|
||||||
|
'label' => $translate->translate('Datenübertragung'),
|
||||||
|
'name' => 'upload_mode',
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
$view->view->form[] = array('type' => 'radio', 'options' => $upload, 'value' => null, 'label' => $translate->translate('Datenübertragung'), 'name' => 'upload_mode');
|
$view->view->form[] = [
|
||||||
|
'type' => 'radio',
|
||||||
|
'options' => $upload,
|
||||||
|
'value' => null,
|
||||||
|
'label' => $translate->translate('Datenübertragung'),
|
||||||
|
'name' => 'upload_mode',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -290,7 +339,7 @@ class market_article
|
|||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||||
$finfo = $finfo->file('uploads/' . $view->view->shop->uid . '/article/' . $file['value']);
|
$finfo = $finfo->file('uploads/' . $view->view->shop->uid . '/article/' . $file['value']);
|
||||||
if ($finfo == "application/pdf") {
|
if ($finfo == 'application/pdf') {
|
||||||
$image = new Imagick();
|
$image = new Imagick();
|
||||||
$image->pingImage('uploads/' . $view->view->shop->uid . '/article/' . $file['value']);
|
$image->pingImage('uploads/' . $view->view->shop->uid . '/article/' . $file['value']);
|
||||||
$max = $max + $image->getNumberImages();
|
$max = $max + $image->getNumberImages();
|
||||||
@ -307,7 +356,7 @@ class market_article
|
|||||||
|
|
||||||
$this->netto = $calc->parse($view, null, $param, $article->a6_resale_price + $articleBasket->getMotivPrice());
|
$this->netto = $calc->parse($view, null, $param, $article->a6_resale_price + $articleBasket->getMotivPrice());
|
||||||
|
|
||||||
if (isset($view->view->layouterPreviewId) && $view->view->layouterPreviewId != "") {
|
if (isset($view->view->layouterPreviewId) && $view->view->layouterPreviewId != '') {
|
||||||
$articleSession = new TP_Layoutersession();
|
$articleSession = new TP_Layoutersession();
|
||||||
|
|
||||||
$articleSess = $articleSession->getLayouterArticle($view->view->layouterPreviewId);
|
$articleSess = $articleSession->getLayouterArticle($view->view->layouterPreviewId);
|
||||||
@ -320,14 +369,16 @@ class market_article
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$ajax) {
|
if (!$ajax) {
|
||||||
|
|
||||||
if (!$view->getRequest()->getParam('special', false)) {
|
if (!$view->getRequest()->getParam('special', false)) {
|
||||||
$view->view->form->addElement('submit', 'send', array('label' => $translate->translate('Calc')));
|
$view->view->form->addElement('submit', 'send', ['label' => $translate->translate('Calc')]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!$view->getRequest()->getParam('special', false)) {
|
if (!$view->getRequest()->getParam('special', false)) {
|
||||||
$view->view->form[] = array('type' => 'submit', 'label' => $translate->translate('Calc'), 'name' => 'send');
|
$view->view->form[] = [
|
||||||
|
'type' => 'submit',
|
||||||
|
'label' => $translate->translate('Calc'),
|
||||||
|
'name' => 'send',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,7 +399,11 @@ class market_article
|
|||||||
}
|
}
|
||||||
$auflage = $view->getRequest()->getParam('auflage', false);
|
$auflage = $view->getRequest()->getParam('auflage', false);
|
||||||
if ($auflage && $auflage > 1) {
|
if ($auflage && $auflage > 1) {
|
||||||
return $this->netto + ($view->getRequest()->getParam('auflage', 1) * $article->a6_resale_price) + ($view->getRequest()->getParam('auflage', 1) * $articleBasket->getMotivPrice());
|
return (
|
||||||
|
$this->netto +
|
||||||
|
($view->getRequest()->getParam('auflage', 1) * $article->a6_resale_price) +
|
||||||
|
($view->getRequest()->getParam('auflage', 1) * $articleBasket->getMotivPrice())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return $this->netto + $article->a6_resale_price + $articleBasket->getMotivPrice();
|
return $this->netto + $article->a6_resale_price + $articleBasket->getMotivPrice();
|
||||||
}
|
}
|
||||||
@ -374,46 +429,53 @@ class market_article
|
|||||||
{
|
{
|
||||||
$path = str_split($data->id);
|
$path = str_split($data->id);
|
||||||
|
|
||||||
|
|
||||||
$orginal = $data->a6_directory;
|
$orginal = $data->a6_directory;
|
||||||
$data->a6_directory = implode('/', $path) . '/';
|
$data->a6_directory = implode('/', $path) . '/';
|
||||||
|
|
||||||
if (file_exists(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/product.zip')) {
|
if (file_exists(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/product.zip')) {
|
||||||
mkdir(APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path), 0777, true);
|
mkdir(APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path), 0o777, true);
|
||||||
copy(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/product.zip', APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path) . '/product.zip');
|
copy(
|
||||||
|
APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/product.zip',
|
||||||
|
APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path) . '/product.zip',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/final.pdf')) {
|
if (file_exists(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/final.pdf')) {
|
||||||
mkdir(APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path), 0777, true);
|
mkdir(APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path), 0o777, true);
|
||||||
copy(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/final.pdf', APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path) . '/final.pdf');
|
copy(
|
||||||
|
APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/final.pdf',
|
||||||
|
APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path) . '/final.pdf',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/preview.pdf')) {
|
if (file_exists(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/preview.pdf')) {
|
||||||
mkdir(APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path), 0777, true);
|
mkdir(APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path), 0o777, true);
|
||||||
copy(APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/preview.pdf', APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path) . '/preview.pdf');
|
copy(
|
||||||
|
APPLICATION_PATH . '/../market/templateprint/orginal/' . $orginal . '/preview.pdf',
|
||||||
|
APPLICATION_PATH . '/../market/templateprint/orginal/' . implode('/', $path) . '/preview.pdf',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$data->save();
|
$data->save();
|
||||||
|
|
||||||
if ($orguuid != false) {
|
if ($orguuid != false) {
|
||||||
|
|
||||||
$articleSession = new TP_Layoutersession();
|
$articleSession = new TP_Layoutersession();
|
||||||
|
|
||||||
$articleSess = $articleSession->getLayouterArticle($orguuid);
|
$articleSess = $articleSession->getLayouterArticle($orguuid);
|
||||||
|
|
||||||
if ($articleSess->getLayouterModus() == 2) {
|
if ($articleSess->getLayouterModus() == 2) {
|
||||||
|
|
||||||
$data->upload_steplayouter_data = $articleSess->getDesignerXML();
|
$data->upload_steplayouter_data = $articleSess->getDesignerXML();
|
||||||
if ($articleSess->getTitle() != "") {
|
if ($articleSess->getTitle() != '') {
|
||||||
$data->title = $articleSess->getTitle();
|
$data->title = $articleSess->getTitle();
|
||||||
}
|
}
|
||||||
$data->save();
|
$data->save();
|
||||||
} elseif ($articleSess->getLayouterModus() == 4) {
|
} elseif ($articleSess->getLayouterModus() == 4) {
|
||||||
|
$design = Doctrine_Query::create()
|
||||||
$design = Doctrine_Query::create()->from('LayouterDesignData c')->where('c.uuid = ?', array(
|
->from('LayouterDesignData c')
|
||||||
$articleSess->getArticleId()
|
->where('c.uuid = ?', [
|
||||||
))->fetchOne();
|
$articleSess->getArticleId(),
|
||||||
|
])
|
||||||
|
->fetchOne();
|
||||||
$data->upload_steplayouter_data = $design->design;
|
$data->upload_steplayouter_data = $design->design;
|
||||||
$articleSession->deleteLayouterArticle($orguuid);
|
$articleSession->deleteLayouterArticle($orguuid);
|
||||||
} else {
|
} else {
|
||||||
@ -424,7 +486,6 @@ class market_article
|
|||||||
|
|
||||||
public function copyAdminPreDispatch($orgArticle, $copyArticle)
|
public function copyAdminPreDispatch($orgArticle, $copyArticle)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($orgArticle->install_id == $copyArticle->install_id) {
|
if ($orgArticle->install_id == $copyArticle->install_id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -442,16 +503,12 @@ class market_article
|
|||||||
|
|
||||||
foreach ($xml as $node) {
|
foreach ($xml as $node) {
|
||||||
foreach ($node->option as $nod) {
|
foreach ($node->option as $nod) {
|
||||||
|
|
||||||
foreach ($nod->children() as $key => $nextNode) {
|
foreach ($nod->children() as $key => $nextNode) {
|
||||||
|
|
||||||
if ($key != 'opt') {
|
if ($key != 'opt') {
|
||||||
foreach ($nextNode->children() as $keys => $nextNodee) {
|
foreach ($nextNode->children() as $keys => $nextNodee) {
|
||||||
preg_match_all('/\$P\w*\$P/', $nextNodee['formel'], $founds);
|
preg_match_all('/\$P\w*\$P/', $nextNodee['formel'], $founds);
|
||||||
if (!empty($founds[0])) {
|
if (!empty($founds[0])) {
|
||||||
|
|
||||||
foreach ($founds[0] as $key => $found) {
|
foreach ($founds[0] as $key => $found) {
|
||||||
|
|
||||||
$foundvalue = str_replace('$P', '', $found);
|
$foundvalue = str_replace('$P', '', $found);
|
||||||
$nextNodee['formel'] = str_replace($found, $$foundvalue, $nextNodee['formel']);
|
$nextNodee['formel'] = str_replace($found, $$foundvalue, $nextNodee['formel']);
|
||||||
}
|
}
|
||||||
@ -463,11 +520,13 @@ class market_article
|
|||||||
foreach ($nextNodee->children() as $keyss => $nextNodeee) {
|
foreach ($nextNodee->children() as $keyss => $nextNodeee) {
|
||||||
preg_match_all('/\$P\w*\$P/', $nextNodeee['formel'], $founds);
|
preg_match_all('/\$P\w*\$P/', $nextNodeee['formel'], $founds);
|
||||||
if (!empty($founds[0])) {
|
if (!empty($founds[0])) {
|
||||||
|
|
||||||
foreach ($founds[0] as $key => $found) {
|
foreach ($founds[0] as $key => $found) {
|
||||||
|
|
||||||
$foundvalue = str_replace('$P', '', $found);
|
$foundvalue = str_replace('$P', '', $found);
|
||||||
$nextNodeee['formel'] = str_replace($found, $$foundvalue, $nextNodeee['formel']);
|
$nextNodeee['formel'] = str_replace(
|
||||||
|
$found,
|
||||||
|
$$foundvalue,
|
||||||
|
$nextNodeee['formel'],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -475,19 +534,22 @@ class market_article
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((string) $nod['mode'] == 'papierdb' && (string) $nod['container'] != "") {
|
if (((string) $nod['mode']) == 'papierdb' && ((string) $nod['container']) != '') {
|
||||||
$inhalt = $papierdborg->xpath('//papiercontainer[@id="' . (string) $nod['container'] . '"]');
|
$inhalt = $papierdborg->xpath('//papiercontainer[@id="' . ((string) $nod['container']) . '"]');
|
||||||
$inhalt = $inhalt[0];
|
$inhalt = $inhalt[0];
|
||||||
|
|
||||||
$papierdborgset = $papierdb->addChild('papiercontainer');
|
$papierdborgset = $papierdb->addChild('papiercontainer');
|
||||||
$papierdborgset->addAttribute('id', $inhalt['id'] . '_' . $copyArticle->id);
|
$papierdborgset->addAttribute('id', $inhalt['id'] . '_' . $copyArticle->id);
|
||||||
if ($inhalt['value'] != "") {
|
if ($inhalt['value'] != '') {
|
||||||
$papierdborgset->addAttribute('value', $inhalt['value']);
|
$papierdborgset->addAttribute('value', $inhalt['value']);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($inhalt->papier as $papier) {
|
foreach ($inhalt->papier as $papier) {
|
||||||
|
$p = Doctrine_Query::create()
|
||||||
$p = Doctrine_Query::create()->select()->from('Papier p')->where('p.art_nr = ? AND p.install_id = ?', array($papier['id'], $orgInstall->id))->fetchOne();
|
->select()
|
||||||
|
->from('Papier p')
|
||||||
|
->where('p.art_nr = ? AND p.install_id = ?', [$papier['id'], $orgInstall->id])
|
||||||
|
->fetchOne();
|
||||||
|
|
||||||
$newPapier = new Papier();
|
$newPapier = new Papier();
|
||||||
$newPapier->install_id = $copyInstall->id;
|
$newPapier->install_id = $copyInstall->id;
|
||||||
@ -499,7 +561,7 @@ class market_article
|
|||||||
|
|
||||||
$papierdbp = $papierdborgset->addChild('papier');
|
$papierdbp = $papierdborgset->addChild('papier');
|
||||||
$papierdbp->addAttribute('id', $newPapier->art_nr);
|
$papierdbp->addAttribute('id', $newPapier->art_nr);
|
||||||
if ($papier['value'] != "") {
|
if ($papier['value'] != '') {
|
||||||
$papierdbp->addAttribute('value', $papier['value']);
|
$papierdbp->addAttribute('value', $papier['value']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -524,82 +586,126 @@ class market_article
|
|||||||
if ($layouterPreviewId) {
|
if ($layouterPreviewId) {
|
||||||
$article = Doctrine_Query::create()
|
$article = Doctrine_Query::create()
|
||||||
->from('Article c')
|
->from('Article c')
|
||||||
->where('c.id = ?', array(intval($articleId)))
|
->where('c.id = ?', [intval($articleId)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
$articleSession = new TP_Layoutersession();
|
$articleSession = new TP_Layoutersession();
|
||||||
$articleSess = $articleSession->getLayouterArticle($layouterPreviewId);
|
$articleSess = $articleSession->getLayouterArticle($layouterPreviewId);
|
||||||
|
|
||||||
if ($articleSess->getTemplatePrintId() != "") {
|
if ($articleSess->getTemplatePrintId() != '') {
|
||||||
return TP_Templateprint::generatePreviewLink($article, $layouterPreviewId);
|
return TP_Templateprint::generatePreviewLink($article, $layouterPreviewId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generatePreview($articleId, $layouterPreviewId = false, $mode = false, $class = "", $onlyPath = false, $order_id = false, $pos = false, $site = 1)
|
public function generatePreview(
|
||||||
{
|
$articleId,
|
||||||
|
$layouterPreviewId = false,
|
||||||
|
$mode = false,
|
||||||
|
$class = '',
|
||||||
|
$onlyPath = false,
|
||||||
|
$order_id = false,
|
||||||
|
$pos = false,
|
||||||
|
$site = 1,
|
||||||
|
) {
|
||||||
if ($order_id && $pos) {
|
if ($order_id && $pos) {
|
||||||
|
|
||||||
$article = Doctrine_Query::create()
|
$article = Doctrine_Query::create()
|
||||||
->from('Article c')
|
->from('Article c')
|
||||||
->where('c.id = ?', array(intval($articleId)))
|
->where('c.id = ?', [intval($articleId)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_Templateprint::generatePreview($article, $layouterPreviewId, $order_id, $pos), $mode, $class, $onlyPath);
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_Templateprint::generatePreview($article, $layouterPreviewId, $order_id, $pos),
|
||||||
|
$mode,
|
||||||
|
$class,
|
||||||
|
$onlyPath,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($layouterPreviewId) {
|
if ($layouterPreviewId) {
|
||||||
$layouterPreviewId = strtoupper($layouterPreviewId);
|
$layouterPreviewId = strtoupper($layouterPreviewId);
|
||||||
$article = Doctrine_Query::create()
|
$article = Doctrine_Query::create()
|
||||||
->from('Article c')
|
->from('Article c')
|
||||||
->where('c.id = ?', array(intval($articleId)))
|
->where('c.id = ?', [intval($articleId)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
$articleSession = new TP_Layoutersession();
|
$articleSession = new TP_Layoutersession();
|
||||||
$articleSess = $articleSession->getLayouterArticle($layouterPreviewId);
|
$articleSess = $articleSession->getLayouterArticle($layouterPreviewId);
|
||||||
|
|
||||||
if ($articleSess->getLayouterModus() == 2) {
|
if ($articleSess->getLayouterModus() == 2) {
|
||||||
|
if (!file_exists(PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId . '.png')) {
|
||||||
if (!file_exists(PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId . ".png")) {
|
Zend_Registry::set('steplayout_preview', 1);
|
||||||
|
|
||||||
Zend_Registry::set("steplayout_preview", 1);
|
|
||||||
|
|
||||||
$data = json_decode($articleSess->getDesignerXML(), true);
|
$data = json_decode($articleSess->getDesignerXML(), true);
|
||||||
$steplayouter = new TP_Steplayouter($data['jsonSaveData'], $article, $data['jsonLayerData'], $data['jsonCreateData']);
|
$steplayouter = new TP_Steplayouter(
|
||||||
|
$data['jsonSaveData'],
|
||||||
|
$article,
|
||||||
|
$data['jsonLayerData'],
|
||||||
|
$data['jsonCreateData'],
|
||||||
|
);
|
||||||
$steplayouter->buildRenderStack($data['width'], $data['height']);
|
$steplayouter->buildRenderStack($data['width'], $data['height']);
|
||||||
$file = $steplayouter->exportPNG(PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId, 400, 400, 1);
|
$file = $steplayouter->exportPNG(
|
||||||
|
PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId,
|
||||||
|
400,
|
||||||
|
400,
|
||||||
|
1,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId . ".png", $mode, $class, $onlyPath);
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId . '.png',
|
||||||
|
$mode,
|
||||||
|
$class,
|
||||||
|
$onlyPath,
|
||||||
|
);
|
||||||
} elseif ($articleSess->getLayouterModus() == 4) {
|
} elseif ($articleSess->getLayouterModus() == 4) {
|
||||||
return '<img src="/apps/component/steplayouter/pdf/imagepreview/' . $layouterPreviewId . '/500" />';
|
return (
|
||||||
|
'<img src="/apps/component/steplayouter/pdf/imagepreview/' .
|
||||||
|
strtolower($layouterPreviewId) .
|
||||||
|
'/500" />'
|
||||||
|
);
|
||||||
} elseif ($articleSess->getLayouterModus() == 5) {
|
} elseif ($articleSess->getLayouterModus() == 5) {
|
||||||
require_once(APPLICATION_PATH . '/helpers/Image.php');
|
require_once APPLICATION_PATH . '/helpers/Image.php';
|
||||||
$imageHelper = new TP_View_Helper_Image();
|
$imageHelper = new TP_View_Helper_Image();
|
||||||
$file = $imageHelper->thumbnailImage($article->title, 'articlesinglegreater', $article->file, true);
|
$file = $imageHelper->thumbnailImage($article->title, 'articlesinglegreater', $article->file, true);
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, $file, $mode, $class, $onlyPath);
|
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, $file, $mode, $class, $onlyPath);
|
||||||
} elseif ($articleSess->getLayouterModus() == 6) {
|
} elseif ($articleSess->getLayouterModus() == 6) {
|
||||||
require_once(APPLICATION_PATH . '/helpers/Image.php');
|
require_once APPLICATION_PATH . '/helpers/Image.php';
|
||||||
$imageHelper = new TP_View_Helper_Image();
|
$imageHelper = new TP_View_Helper_Image();
|
||||||
$file = $imageHelper->thumbnailImage($article->title, 'articlesinglegreater', $article->file, true);
|
$file = $imageHelper->thumbnailImage($article->title, 'articlesinglegreater', $article->file, true);
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, $file, $mode, $class, $onlyPath);
|
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, $file, $mode, $class, $onlyPath);
|
||||||
} elseif ($articleSess->getLayouterModus() == 8) {
|
} elseif ($articleSess->getLayouterModus() == 8) {
|
||||||
return '<img src="https://store.hpwallart.com/huelswitt/projects/' . $articleSess->getTemplatePrintId() . '/preview_medium.png" />';
|
return (
|
||||||
|
'<img src="https://store.hpwallart.com/huelswitt/projects/' .
|
||||||
|
$articleSess->getTemplatePrintId() .
|
||||||
|
'/preview_medium.png" />'
|
||||||
|
);
|
||||||
} elseif ($articleSess->getLayouterModus() == 9) {
|
} elseif ($articleSess->getLayouterModus() == 9) {
|
||||||
return '<img src="/apps/plugin/chilipublish/designer/preview/' . $article->Shop->getApiKey() . '/' . $articleSess->getTemplatePrintId() . '/' . $site . '" />';
|
return (
|
||||||
|
'<img src="/apps/plugin/chilipublish/designer/preview/' .
|
||||||
|
$article->Shop->getApiKey() .
|
||||||
|
'/' .
|
||||||
|
$articleSess->getTemplatePrintId() .
|
||||||
|
'/' .
|
||||||
|
$site .
|
||||||
|
'" />'
|
||||||
|
);
|
||||||
} elseif ($articleSess->getLayouterModus() == 10) {
|
} elseif ($articleSess->getLayouterModus() == 10) {
|
||||||
return '<img src="/apps/api/formlayouter/preview/layouter/' . $layouterPreviewId . '/' . $site . '/500" />';
|
return (
|
||||||
|
'<img src="/apps/api/formlayouter/preview/layouter/' . $layouterPreviewId . '/' . $site . '/500" />'
|
||||||
|
);
|
||||||
} elseif ($articleSess->getLayouterModus() == 11) {
|
} elseif ($articleSess->getLayouterModus() == 11) {
|
||||||
$layoutData = Doctrine_Query::create()
|
$layoutData = Doctrine_Query::create()
|
||||||
->from('LayouterDesignData c')
|
->from('LayouterDesignData c')
|
||||||
->where('c.uuid = ?', array((string)$layouterPreviewId))
|
->where('c.uuid = ?', [(string) $layouterPreviewId])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
$design = json_decode($layoutData->design, true);
|
$design = json_decode($layoutData->design, true);
|
||||||
return '<img src="' . $design['previews'][0] . '" class="layouter_10" />';
|
return '<img src="' . $design['previews'][0] . '" class="layouter_10" />';
|
||||||
} elseif ($articleSess->getLayouterModus() == 12) {
|
} elseif ($articleSess->getLayouterModus() == 12) {
|
||||||
$layoutData = Doctrine_Query::create()
|
$layoutData = Doctrine_Query::create()
|
||||||
->from('LayouterDesignData c')
|
->from('LayouterDesignData c')
|
||||||
->where('c.uuid = ?', array((string)$layouterPreviewId))
|
->where('c.uuid = ?', [(string) $layouterPreviewId])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
$design = json_decode($layoutData->design, true);
|
$design = json_decode($layoutData->design, true);
|
||||||
if (isset($design['previews'][$site - 1]['url'])) {
|
if (isset($design['previews'][$site - 1]['url'])) {
|
||||||
@ -609,81 +715,116 @@ class market_article
|
|||||||
} elseif ($articleSess->getLayouterModus() == 101) {
|
} elseif ($articleSess->getLayouterModus() == 101) {
|
||||||
$layoutData = Doctrine_Query::create()
|
$layoutData = Doctrine_Query::create()
|
||||||
->from('LayouterDesignData c')
|
->from('LayouterDesignData c')
|
||||||
->where('c.uuid = ?', array((string)$layouterPreviewId))
|
->where('c.uuid = ?', [(string) $layouterPreviewId])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
$design = json_decode($layoutData->design, true);
|
$design = json_decode($layoutData->design, true);
|
||||||
return '<img src="' . $design['previews'] . '" class="layouter_10" />';
|
return '<img src="' . $design['previews'] . '" class="layouter_10" />';
|
||||||
|
|
||||||
} elseif ($articleSess->getLayouterModus() == 102) {
|
} elseif ($articleSess->getLayouterModus() == 102) {
|
||||||
$layoutData = Doctrine_Query::create()
|
$layoutData = Doctrine_Query::create()
|
||||||
->from('LayouterDesignData c')
|
->from('LayouterDesignData c')
|
||||||
->where('c.uuid = ?', array((string)$layouterPreviewId))
|
->where('c.uuid = ?', [(string) $layouterPreviewId])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
$design = json_decode($layoutData->design, true);
|
$design = json_decode($layoutData->design, true);
|
||||||
|
|
||||||
return '<img src="/apps/' . substr($design['previews'][0], 13) . '" class="layouter_10" />';
|
return '<img src="/apps/' . substr($design['previews'][0], 13) . '" class="layouter_10" />';
|
||||||
|
} elseif ($articleSess->getTemplatePrintId() != '') {
|
||||||
} elseif ($articleSess->getTemplatePrintId() != "") {
|
|
||||||
|
|
||||||
if (!TP_Templateprint::siteExists($article, $layouterPreviewId, false, false, $site)) {
|
if (!TP_Templateprint::siteExists($article, $layouterPreviewId, false, false, $site)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_Templateprint::generatePreview($article, $layouterPreviewId, false, false, $site), $mode, $class, $onlyPath, true);
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_Templateprint::generatePreview($article, $layouterPreviewId, false, false, $site),
|
||||||
|
$mode,
|
||||||
|
$class,
|
||||||
|
$onlyPath,
|
||||||
|
true,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$article = Doctrine_Query::create()
|
$article = Doctrine_Query::create()
|
||||||
->from('Article c')
|
->from('Article c')
|
||||||
->where('c.id = ?', array(intval($articleId)))
|
->where('c.id = ?', [intval($articleId)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
if ($article->upload_steplayouter_data != "") {
|
if ($article->upload_steplayouter_data != '') {
|
||||||
return '<img src="/apps/component/steplayouter/pdf/imagepreview/' . $article->uuid . '/500" />';
|
return (
|
||||||
|
'<img src="/apps/component/steplayouter/pdf/imagepreview/' . strtolower($article->uuid) . '/500" />'
|
||||||
|
);
|
||||||
} elseif (TP_Templateprint::isTemplateExists($article)) {
|
} elseif (TP_Templateprint::isTemplateExists($article)) {
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_Templateprint::generatePreview($article), $mode, $class, $onlyPath);
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_Templateprint::generatePreview($article),
|
||||||
|
$mode,
|
||||||
|
$class,
|
||||||
|
$onlyPath,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($layouterPreviewId != false && $layouterPreviewId != "") {
|
if ($layouterPreviewId != false && $layouterPreviewId != '') {
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_FOP::generatePreview($articleId, $layouterPreviewId), $mode, $class, $onlyPath);
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_FOP::generatePreview($articleId, $layouterPreviewId),
|
||||||
|
$mode,
|
||||||
|
$class,
|
||||||
|
$onlyPath,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_FOP::generatePreview($articleId), $mode, $class, $onlyPath);
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_FOP::generatePreview($articleId),
|
||||||
|
$mode,
|
||||||
|
$class,
|
||||||
|
$onlyPath,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generatePreviewBig($articleId, $layouterPreviewId = false)
|
public function generatePreviewBig($articleId, $layouterPreviewId = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($layouterPreviewId) {
|
if ($layouterPreviewId) {
|
||||||
$article = Doctrine_Query::create()
|
$article = Doctrine_Query::create()
|
||||||
->from('Article c')
|
->from('Article c')
|
||||||
->where('c.id = ?', array(intval($articleId)))
|
->where('c.id = ?', [intval($articleId)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
$articleSession = new TP_Layoutersession();
|
$articleSession = new TP_Layoutersession();
|
||||||
$articleSess = $articleSession->getLayouterArticle($layouterPreviewId);
|
$articleSess = $articleSession->getLayouterArticle($layouterPreviewId);
|
||||||
|
|
||||||
if ($articleSess->getLayouterModus() == 2) {
|
if ($articleSess->getLayouterModus() == 2) {
|
||||||
|
|
||||||
$steplayouter = new TP_Steplayouter(json_decode($articleSess->getDesignerXML(), true), $article);
|
$steplayouter = new TP_Steplayouter(json_decode($articleSess->getDesignerXML(), true), $article);
|
||||||
$steplayouter->buildRenderStack();
|
$steplayouter->buildRenderStack();
|
||||||
$file = $steplayouter->exportPNG(PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId, 400, 400, 1);
|
$file = $steplayouter->exportPNG(PUBLIC_PATH . '/steplayouter/temp/' . $layouterPreviewId, 400, 400, 1);
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, $file);
|
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, $file);
|
||||||
} elseif ($articleSess->getLayouterModus() == 8) {
|
} elseif ($articleSess->getLayouterModus() == 8) {
|
||||||
return '<img src="https://store.hpwallart.com/huelswitt/projects/' . $articleSess->getTemplatePrintId() . '/preview_large.png" />';
|
return (
|
||||||
} elseif ($articleSess->getTemplatePrintId() != "") {
|
'<img src="https://store.hpwallart.com/huelswitt/projects/' .
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_Templateprint::generatePreview($article, $layouterPreviewId));
|
$articleSess->getTemplatePrintId() .
|
||||||
|
'/preview_large.png" />'
|
||||||
|
);
|
||||||
|
} elseif ($articleSess->getTemplatePrintId() != '') {
|
||||||
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_Templateprint::generatePreview($article, $layouterPreviewId),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$article = Doctrine_Query::create()
|
$article = Doctrine_Query::create()
|
||||||
->from('Article c')
|
->from('Article c')
|
||||||
->where('c.id = ?', array(intval($articleId)))
|
->where('c.id = ?', [intval($articleId)])
|
||||||
->fetchOne();
|
->fetchOne();
|
||||||
|
|
||||||
if ($article->upload_templateprint && $article->render_new_preview_image == false) {
|
if ($article->upload_templateprint && $article->render_new_preview_image == false) {
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_Templateprint::generatePreview($article));
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_Templateprint::generatePreview($article),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($layouterPreviewId != false && $layouterPreviewId != "") {
|
if ($layouterPreviewId != false && $layouterPreviewId != '') {
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_FOP::generatePreview($articleId, $layouterPreviewId));
|
return TP_Image::generateWidthImgTag(
|
||||||
|
TP_Image::LAYOUTERPREVIEW,
|
||||||
|
TP_FOP::generatePreview($articleId, $layouterPreviewId),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_FOP::generatePreview($articleId));
|
return TP_Image::generateWidthImgTag(TP_Image::LAYOUTERPREVIEW, TP_FOP::generatePreview($articleId));
|
||||||
}
|
}
|
||||||
|
|||||||
35
src/old/library/Zend/View/Helper/FormHelpcheckbox.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zend Framework
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the new BSD license that is bundled
|
||||||
|
* with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://framework.zend.com/license/new-bsd
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@zend.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* @category Zend
|
||||||
|
* @package Zend_View
|
||||||
|
* @subpackage Helper
|
||||||
|
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||||
|
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Abstract class for extension
|
||||||
|
*/
|
||||||
|
require_once 'Zend/View/Helper/FormElement.php';
|
||||||
|
|
||||||
|
class Zend_View_Helper_FormHelpcheckbox extends Zend_View_Helper_FormCheckbox
|
||||||
|
{
|
||||||
|
public function formHelpcheckbox($name, $value = null, $attribs = null, null|array $checkedOptions = null)
|
||||||
|
{
|
||||||
|
return $this->formCheckbox($name, $value, $attribs, $checkedOptions);
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
src/old/market/steplayouter/basket/283/1/AF-07.12.2025-78_1.pdf
Normal file
BIN
src/old/public/temp/3e72ab89-2a0e-d82b-5c49-44d051b3e582_0.pdf
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
BIN
src/old/public/temp/693435d52640c.pdf.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
src/old/public/temp/693435f318576.pdf.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
src/old/public/temp/6934362adc811.pdf.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
src/old/public/temp/6934a0321992d.pdf.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
src/old/public/temp/6934a12abb6fb.pdf.png
Normal file
|
After Width: | Height: | Size: 810 B |
BIN
src/old/public/temp/6934ab347c535.pdf.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/old/public/temp/6934aba1c4b5f.pdf.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/old/public/temp/6934b38731a18.pdf.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/old/public/temp/6934b62835cd0.pdf.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
src/old/public/temp/6934b647d436d.pdf.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
src/old/public/temp/69358930a901b.pdf.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
src/old/public/temp/6935893ca47e8.pdf.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
src/old/public/temp/69358a5ca541b.pdf.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
src/old/public/temp/69358aa88a27f.pdf.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
src/old/public/temp/69358ab009f7a.pdf.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
src/old/public/temp/6935a8ed33f70.pdf
Normal file
BIN
src/old/public/temp/6935a90cde8cd.pdf.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/old/public/temp/6935a9139213b.pdf.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/old/public/temp/6935a926f09b5.pdf.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/old/public/temp/test.pdf
Normal file
13
src/old/public/temp/test.svg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1208" height="1701" viewBox="0 0 1208 1701" xml:space="preserve">
|
||||||
|
<desc>Created with Fabric.js 1.6.5</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="canvas" style="display:inline" ><rect id="background-color" x="-181.2" y="-255.14999999999998" rx="0" ry="0" width="362.4" height="510.29999999999995" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,255,255); fill-rule: nonzero; opacity: 1;" transform="translate(605.67 852.17) scale(3.33 3.33)"/>
|
||||||
|
<clipPath id="canvas-0aa4e9f0-7cf7-43e2-bc68-2b85d76560d9"><rect x="-181.2" y="-255.14999999999998" rx="0" ry="0" width="362.4" height="510.29999999999995" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,255,255); fill-opacity: 0; fill-rule: nonzero; opacity: 1;" transform="translate(0 0) matrix(1 0 0 1 5.9524999999999695 -16.645000000000085) "/>
|
||||||
|
</clipPath> <g clip-path="url(#canvas-0aa4e9f0-7cf7-43e2-bc68-2b85d76560d9)" transform="translate(603.99 925.82) scale(3.33 3.33)">
|
||||||
|
<text font-family="Josefin Slab" font-size="40" font-weight="400" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" >
|
||||||
|
<tspan x="-81.24" y="12.6" fill="rgb(0,0,0)">Dein Text</tspan>
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |